agate API reference
69 public APIs from agate (wireservice/agate) — 49 classes, 4 functions, 16 methods. Signatures extracted by static analysis of the actual source.
Repository: wireservice/agate
| Kind | Count |
|---|---|
| Classes | 49 |
| Functions | 4 |
| Methods | 16 |
API list
class
agate.aggregations.all.AllCheck if all values in a column pass a test.
method
agate.aggregations.all.All.run(table):returns: :class:`bool`
class
agate.aggregations.any.AnyCheck if any value in a column passes a test.
class
agate.aggregations.base.AggregationAggregations create a new value by summarizing a :class:`.Column`.
class
agate.aggregations.count.CountCount occurences of a value or values.
class
agate.aggregations.deciles.DecilesCalculate the deciles of a column based on its percentiles.
class
agate.aggregations.first.FirstReturns the first value that passes a test.
class
agate.aggregations.has_nulls.HasNullsCheck if the column contains null values.
class
agate.aggregations.iqr.IQRCalculate the interquartile range of a column.
class
agate.aggregations.max.MaxFind the maximum value in a column.
class
agate.aggregations.max_length.MaxLengthFind the length of the longest string in a column.
method
agate.aggregations.max_length.MaxLength.run(table):returns: :class:`int`.
class
agate.aggregations.mean.MeanCalculate the mean of a column.
class
agate.aggregations.median.MedianCalculate the median of a column.
class
agate.aggregations.min.MinFind the minimum value in a column.
class
agate.aggregations.mode.ModeCalculate the mode of a column.
class
agate.aggregations.quartiles.QuartilesCalculate the quartiles of column based on its percentiles.
class
agate.aggregations.stdev.StDevCalculate the sample standard of deviation of a column.
class
agate.aggregations.sum.SumCalculate the sum of a column.
class
agate.aggregations.summary.SummaryApply an arbitrary function to a column.
class
agate.aggregations.variance.PopulationVarianceCalculate the population variance of a column.
class
agate.aggregations.variance.VarianceCalculate the sample variance of a column.
class
agate.columns.ColumnProxy access to column data.
method
agate.columns.Column.data_type()This column's data type.
method
agate.columns.Column.index()This column's index.
method
agate.columns.Column.name()This column's name.
method
agate.columns.Column.values()Get the values in this column, as a tuple.
method
agate.columns.Column.values_sorted()Get the values in this column sorted.
func
agate.columns.null_handler(k)Key method for sorting nulls correctly.
class
agate.computations.change.ChangeCalculate the difference between two columns.
class
agate.computations.formula.FormulaApply an arbitrary function to each row.
class
agate.computations.percent.PercentCalculate each values percentage of a total.
method
agate.computations.percent.Percent.run(table):returns: :class:`decimal.Decimal`
class
agate.computations.percent_change.PercentChangeCalculate the percent difference between two columns.
class
agate.computations.percentile_rank.PercentileRankCalculate the percentile into which each value falls.
method
agate.computations.percentile_rank.PercentileRank.run(table):returns: :class:`int`
class
agate.computations.rank.RankCalculate rank order of the values in a column.
method
agate.computations.rank.Rank.run(table):returns: :class:`int`
class
agate.computations.slug.SlugConvert text values from one or more columns into slugs.
method
agate.computations.slug.Slug.run(table):returns: :class:`string`
class
agate.csv_py3.DictReaderA wrapper around Python 3's builtin :class:`csv.DictReader`.
class
agate.csv_py3.DictWriterA wrapper around Python 3's builtin :class:`csv.DictWriter`.
class
agate.csv_py3.ReaderA wrapper around Python 3's builtin :func:`csv.reader`.
class
agate.csv_py3.SnifferA functional wrapper of ``csv.Sniffer()``.
class
agate.csv_py3.WriterA wrapper around Python 3's builtin :func:`csv.writer`.
class
agate.data_types.base.DataTypeSpecifies how values should be parsed when creating a :class:`.Table`.
class
agate.data_types.boolean.BooleanData representing true and false.
method
agate.data_types.boolean.Boolean.cast(d)Cast a single value to :class:`bool`.
class
agate.data_types.date.DateData representing dates alone.
class
agate.data_types.date_time.DateTimeData representing dates with times.
class
agate.data_types.number.NumberData representing numbers.
class
agate.data_types.text.TextData representing text.
class
agate.exceptions.CastErrorA column value can not be cast to the correct type.
class
agate.exceptions.DataTypeErrorA calculation was attempted with an invalid :class:`.DataType`.
class
agate.exceptions.FieldSizeLimitErrorA field in a CSV file exceeds the maximum length.
class
agate.exceptions.UnsupportedAggregationErrorAn :class:`.Aggregation` was attempted which is not supported.
class
agate.fixed.ReaderReads a fixed-width file using a column schema in CSV format.
class
agate.rows.RowA row of data.
class
agate.table.TableA dataset consisting of rows and columns.
method
agate.table.Table.column_names()An tuple of strings.
method
agate.table.Table.column_types()An tuple :class:`.DataType` instances.
method
agate.table.Table.print_csv(**kwargs)Print this table as a CSV.
method
agate.table.Table.print_json(**kwargs)Print this table as JSON.
func
agate.table.find.find(self, test)Find the first row that passes a test.
func
agate.table.order_by.order_by(self, key, reverse=False)Create a new table that is sorted.
func
agate.table.to_csv.to_csv(self, path, **kwargs)Write this table to a CSV.
class
agate.tableset.TableSetAn group of named tables with identical column definitions.
class
agate.testcase.AgateTestCaseUnittest case for quickly asserting logic about tables.
class
agate.utils.NullOrderDummy object used for sorting in place of None.
About this data
These signatures were extracted from the public source of wireservice/agate
using Python's ast module. Argument names, default values,
type annotations and return types are taken verbatim from the code.
Implementation bodies are never stored. See
how it works for details.