Agate

Latest version: v1.12.0

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

Scan your dependencies

Page 5 of 7

1.2.1

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

This release implements several new features and bug fixes. There are no significant breaking changes.

Special thanks to `Neil Bedi <https://github.com/nbedi>`_ for his extensive contributions to this release.

* Added a ``max_column_width`` argument to :meth:`.Table.print_table`. Defaults to ``20``. (442)
* :meth:`.Table.from_json` now defers most functionality to :meth:`.Table.from_object`.
* Implemented :meth:`.Table.from_object` for parsing JSON-like Python objects.
* Fixed a bug that prevented :meth:`.Table.order_by` on empty table. (454)
* :meth:`.Table.from_json` and :meth:`TableSet.from_json` now have ``column_types`` as an optional argument. (451)
* :class:`.csv.Reader` now has ``line_numbers`` and ``header`` options to add column for line numbers (447)
* Renamed ``maxfieldsize`` to ``field_size_limit`` in :class:`.csv.Reader` for consistency (447)
* :meth:`.Table.from_csv` now has a ``sniff_limit`` option to use :class:`.csv.Sniffer` (444)
* :class:`.csv.Sniffer` implemented. (444)
* :meth:`.Table.__init__` no longer fails on empty rows. (445)
* :meth:`.TableSet.from_json` implemented. (373)
* Fixed a bug that breaks :meth:`TypeTester.run` on variable row length. (440)
* Added :meth:`.TableSet.__str__` to display :class:`.Table` keys and row counts. (418)
* Fixed a bug that incorrectly checked for column_types equivalence in :meth:`.Table.merge` and :meth:`.TableSet.__init__`. (435)
* :meth:`.TableSet.merge` now has the ability to specify grouping factors with ``group``, ``group_name`` and ``group_type``. (406)
* :class:`.Table` can now be constructed with ``None`` for some column names. Those columns will receive letter names. (432)
* Slightly changed the parsing of dates and datetimes from strings.
* Numbers are now written to CSV without extra zeros after the decimal point. (429)
* Made it possible for ``datetime.date`` instances to be considered valid :class:`.DateTime` inputs. (427)
* Changed preference order in type testing so :class:`.Date` is preferred to :class:`.DateTime`.
* Removed ``float_precision`` argument from :class:`.Number`. (428)
* :class:`.AgateTestCase` is now available as ``agate.AgateTestCase``. (426)
* :meth:`.TableSet.to_json` now has an ``indent`` option for use with ``nested``.
* :meth:`.TableSet.to_json` now has a ``nested`` option for writing a single, nested JSON file. (417)
* :meth:`.TestCase.assertRowNames` and :meth:`.TestCase.assertColumnNames` now validate the row and column instance keys.
* Fixed a bug that prevented :meth:`.Table.rename` from renaming column names in :class:`.Row` instances. (423)

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)

Page 5 of 7

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.