Agate

Latest version: v1.11.0

Safety actively analyzes 641102 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 5 of 7

1.2.0

------------------------

This version introduces one breaking change, which is only relevant if you are using custom :class:`.Computation` subclasses.

1. :class:`.Computation` has been modified so that :meth:`.Computation.run` takes a :class:`.Table` instance as its argument, rather than a single row. It must return a sequence of values to use for a new column. In addition, the :meth:`.Computation._prepare` method has been renamed to :meth:`.Computation.validate` to more accurately describe it's function. These changes were made to facilitate computing moving averages, streaks and other values that require data for the full column.

* Existing :class:`.Aggregation` subclasses have been updated to use :meth:`.Aggregate.validate`. (This brings a noticeable performance boost.)
* :class:`.Aggregation` now has a :meth:`.Aggregation.validate` method that functions identically to :meth:`.Computation.validate`. (421)
* :meth:`.Change.validate` now correctly raises :class:`.DataTypeError`.
* Added a ``SimpleMovingAverage`` implementation to the cookbook's examples of custom :class:`.Computation` classes.
* :meth:`.Computation._prepare` has been renamed to :meth:`.Computation.validate`.
* :meth:`.Computation.run` now takes a :class:`.Table` instance as an argument. (415)
* Fix a bug in Python 2 where printing a table could raise ``decimal.InvalidOperation``. (412)
* Fix :class:`.Rank` so it returns Decimal. (411)
* Added Taurus Olson to AUTHORS.
* Printing a table will now print the table's structure.
* :meth:`.Table.print_structure` implemented. (393)
* Added Geoffrey Hing to AUTHORS.
* :meth:`.Table.print_html` implemented. (408)
* Instances of :class:`.Date` and :class:`.DateTime` can now be pickled. (362)
* :class:`.AgateTestCase` is available as ``agate.testcase.AgateTestCase`` for extensions to use. (384)
* :meth:`.Table.exclude` implemented. Opposite of :meth:`.Table.select`. (388)
* :meth:`.Table.merge` now accepts a ``row_names`` argument. (403)
* :class:`.Formula` now automatically casts computed values to specified data type unless ``cast`` is set to ``False``. (398)
* Added Neil Bedi to AUTHORS.
* :meth:`.Table.rename` is implemented. (389)
* :meth:`.TableSet.to_json` is implemented. (374)
* :meth:`.Table.to_csv` and :meth:`.Table.to_json` will now create the target directory if it does not exist. (392)
* :class:`.Boolean` will now correctly cast numerical ``0`` and ``1``. (386)
* :meth:`.Table.merge` now consistently maps column names to rows. (402)

1.1.0

------------------------

This version of agate introduces three major changes.

1. :class:`.Table`, :meth:`.Table.from_csv` and :meth:`.TableSet.from_csv` now all take ``column_names`` and ``column_types`` as separate arguments instead of as a sequence of tuples. This was done to enable more flexible type inference and to streamline the API.
2. The interfaces for :meth:`.TableSet.aggregate` and :meth:`.Table.compute` have been changed. In both cases the new column name now comes first. Aggregations have also been modified so that the input column name is an argument to the aggregation class, rather than a third element in the tuple.
3. This version drops support for Python 2.6. Testing and bug-fixing for this version was taking substantial time with no evidence that anyone was actually using it. Also, multiple dependencies claim to not support 2.6, even though agate's tests were passing.

* DataType's now have :meth:`.DataType.csvify` and :meth:`.DataType.jsonify` methods for serializing native values.
* Added a dependency on `isodate <https://github.com/gweis/isodate>`_ for handling ISO8601 formatted dates. (#233)
* :class:`.Aggregation` results are no longer cached. (378)
* Removed `Column.aggregate` method. Use :meth:`.Table.aggregate` instead. (378)
* Added :meth:`.Table.aggregate` for aggregating single column results. (378)
* :class:`.Aggregation` subclasses now take column names as their first argument. (378)
* :meth:`.TableSet.aggregate` and :meth:`.Table.compute` now take the new column name as the first argument. (378)
* Remove support for Python 2.6.
* :meth:`.Table.to_json` is implemented. (345)
* :meth:`.Table.from_json` is implemented. (344, 347)
* :class:`.Date` and :class:`.DateTime` type testing now takes specified format into account. (361)
* :class:`.Number` data type now takes a ``float_precision`` argument.
* :class:`.Number` data types now work with native float values. (370)
* :class:`.TypeTester` can now validate Python native types (not just strings). (367)
* :class:`.TypeTester` can now be used with the :class:`.Table` constructor, not just :meth:`.Table.from_csv`. (350)
* :class:`.Table`, :meth:`.Table.from_csv` and :meth:`.TableSet.from_csv` now take ``column_names`` and ``column_types`` as separate parameters. (350)
* :const:`.DEFAULT_NULL_VALUES` (the list of strings that mean null) is now importable from ``agate``.
* :meth:`.Table.from_csv` and :meth:`.Table.to_csv` are now unicode-safe without separately importing csvkit.
* ``agate`` can now be used as a drop-in replacement for Python's ``csv`` module.
* Migrated `csvkit <https://csvkit.readthedocs.org>`_'s unicode CSV reading/writing support into agate. (#354)

1.0.1

------------------------

* TypeTester now takes a "limit" arg that restricts how many rows it tests. (332)
* Table.from_csv now supports CSVs with neither headers nor manual column names.
* Tables can now be created with automatically generated column names. (331)
* File handles passed to Table.to_csv are now left open. (330)
* Added Table.print_csv method. (307, 339)
* Fixed stripping currency symbols when casting Numbers from strings. (333)
* Fixed two major join issues. (336)

1.0.0

------------------------

* Table.from_csv now defaults to TypeTester() if column_info is not provided. (324)
* New tutorial section: "Navigating table data" (315)
* 100% test coverage reached. (312)
* NullCalculationError is now a warning instead of an error. (311)
* TableSet is now a subclass of MappedSequence.
* Rows and Columns are now subclasses of MappedSequence.
* Add Column.values_without_nulls_sorted().
* Column.get_data_without_nulls() is now Column.values_without_nulls().
* Column.get_data_sorted() is now Column.values_sorted().
* Column.get_data() is now Column.values().
* Columns can now be sliced.
* Columns can now be indexed by row name. (301)
* Added support for Python 3.5.
* Row objects can now be sliced. (303)
* Replaced RowSequence and ColumnSequence with MappedSequence.
* Replace RowDoesNotExistError with KeyError.
* Replaced ColumnDoesNotExistError with IndexError.
* Removed unnecessary custom RowIterator, ColumnIterator and CellIterator.
* Performance improvements for Table "forks". (where, limit, etc)
* TableSet keys are now converted to row names during aggregation. (291)
* Removed fancy __repr__ implementations. Use __str__ instead. (290)
* Rows can now be accessed by name as well as index. (282)
* Added row_names argument to Table constructor. (282)
* Removed Row.table and Row.index properties. (287)
* Columns can now be accessed by index as well as name. (281)
* Added column name and type validation to Table constructor. (285)
* Table now supports variable-length rows during construction. (39)
* aggregations.Summary implemented for generic aggregations. (181)
* Fix TableSet.key_type being lost after proxying Table methods. (278)
* Massive performance increases for joins. (277)
* Added join benchmark. (73)

0.11.0

------------------------

* Implemented __repr__ for Table, TableSet, Column and Row. (261)
* Row.index property added.
* Column constructor no longer takes a data_type argument.
* Column.index and Column.name properties added.
* Table.counts implemented. (271)
* Table.bins implemented. (267, 227)
* Table.join now raises ColumnDoesNotExistError. (264)
* Table.select now raises ColumnDoesNotExistError.
* computations.ZScores moved into agate-stats.
* computations.Rank cmp argument renamed comparer.
* aggregations.MaxPrecision added. (265)
* Table.print_bars added.
* Table.pretty_print renamed Table.print_table.
* Reimplement Table method proxying via allow_tableset_proxy decorator. (263)
* Add agate-stats references to docs.
* Move stdev_outliers, mad_outliers and pearson_correlation into agate-stats. (260)
* Prevent issues with applying patches multiple times. (258)

0.10.0

---------------------------

* Add reverse and cmp arguments to Rank computation. (248)
* Document how to use agate-sql to read/write SQL tables. (238, 241)
* Document how to write extensions.
* Add monkeypatching extensibility pattern via utils.Patchable.
* Reversed order of argument pairs for Table.compute. (249)
* TableSet.merge method can be used to ungroup data. (253)
* Columns with identical names are now suffixed "2" after a Table.join.
* Duplicate key columns are no longer included in the result of a Table.join. (250)
* Table.join right_key no longer necessary if identical to left_key. (254)
* Table.inner_join is now more. Use `inner` keyword to Table.join.
* Table.left_outer_join is now Table.join.

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.