eland.Series.value_counts

Series.value_counts(es_size: int = 10) → pandas.core.series.Series

Return the value counts for the specified field.

Note we can only do this for aggregatable Elasticsearch fields - (in general) numeric and keyword rather than text fields

TODO - implement remainder of pandas arguments

Parameters
es_size: int, default 10

Number of buckets to return counts for, automatically sorts by count descending. This parameter is specific to eland, and determines how many term buckets elasticsearch should return out of the overall terms list.

Returns
pandas.Series

number of occurrences of each value in the column

Examples

>>> df = ed.DataFrame('localhost', 'flights')
>>> df['Carrier'].value_counts()
Logstash Airways    3331
JetBeats            3274
Kibana Airlines     3234
ES-Air              3220
Name: Carrier, dtype: int64