eland.Series#

class eland.Series(es_client: Optional[Elasticsearch] = None, es_index_pattern: Optional[str] = None, name: Optional[str] = None, es_index_field: Optional[str] = None, _query_compiler: Optional[QueryCompiler] = None)#

pandas.Series like API that proxies into Elasticsearch index(es).

Parameters#

es_clientelasticsearch.Elasticsearch

A reference to a Elasticsearch python client

es_index_patternstr

An Elasticsearch index pattern. This can contain wildcards.

es_index_fieldstr

The field to base the series on

Notes#

If the Elasticsearch index is deleted or index mappings are changed after this object is created, the object is not rebuilt and so inconsistencies can occur.

See Also#

pandas.Series

Examples#

>>> ed.Series(es_client='http://localhost:9200', es_index_pattern='flights', name='Carrier')
0         Kibana Airlines
1        Logstash Airways
2        Logstash Airways
3         Kibana Airlines
4         Kibana Airlines
               ...
13054    Logstash Airways
13055    Logstash Airways
13056    Logstash Airways
13057            JetBeats
13058            JetBeats
Name: Carrier, Length: 13059, dtype: object
__init__(es_client: Optional[Elasticsearch] = None, es_index_pattern: Optional[str] = None, name: Optional[str] = None, es_index_field: Optional[str] = None, _query_compiler: Optional[QueryCompiler] = None) None#

pandas.DataFrame/Series like API that proxies into Elasticsearch index(es).

Parameters#

clientelasticsearch.Elasticsearch

A reference to a Elasticsearch python client

Methods

__init__([es_client, es_index_pattern, ...])

pandas.DataFrame/Series like API that proxies into Elasticsearch index(es).

add(right)

Return addition of series and right, element-wise (binary operator add).

describe()

Generate descriptive statistics that summarize the central tendency, dispersion and shape of a dataset’s distribution, excluding NaN values.

div(right)

Return floating division of series and right, element-wise (binary operator truediv).

divide(right)

Return floating division of series and right, element-wise (binary operator truediv).

es_info()

es_match(text, *[, match_phrase, ...])

Filters data with an Elasticsearch match or match_phrase query depending on the given parameters.

filter([items, like, regex, axis])

Subset the dataframe rows or columns according to the specified index labels.

floordiv(right)

Return integer division of series and right, element-wise (binary operator floordiv //).

head([n])

hist([by, ax, grid, xlabelsize, xrot, ...])

Draw histogram of the input series using matplotlib.

isin(other)

isna()

Detect missing values.

isnull()

Detect missing values.

mad([numeric_only])

Return median absolute deviation for a Series

max([numeric_only])

Return the maximum of the Series values

mean([numeric_only])

Return the mean of the Series values

median([numeric_only])

Return the median of the Series values

min([numeric_only])

Return the minimum of the Series values

mod(right)

Return modulo of series and right, element-wise (binary operator mod %).

mode([es_size])

Calculate mode of a series

mul(right)

Return multiplication of series and right, element-wise (binary operator mul).

multiply(right)

Return multiplication of series and right, element-wise (binary operator mul).

notna()

Detect existing (non-missing) values.

notnull()

Detect existing (non-missing) values.

nunique()

Return the number of unique values in a Series

pow(right)

Return exponential power of series and right, element-wise (binary operator pow).

quantile([q])

Used to calculate quantile for a given Series.

radd(left)

Return addition of series and left, element-wise (binary operator add).

rdiv(left)

Return division of series and left, element-wise (binary operator div).

rdivide(left)

Return division of series and left, element-wise (binary operator div).

rename(new_name)

Rename name of series.

rfloordiv(left)

Return integer division of series and left, element-wise (binary operator floordiv //).

rmod(left)

Return modulo of series and left, element-wise (binary operator mod %).

rmul(left)

Return multiplication of series and left, element-wise (binary operator mul).

rmultiply(left)

Return multiplication of series and left, element-wise (binary operator mul).

rpow(left)

Return exponential power of series and left, element-wise (binary operator pow).

rsub(left)

Return subtraction of series and left, element-wise (binary operator sub).

rsubtract(left)

Return subtraction of series and left, element-wise (binary operator sub).

rtruediv(left)

Return division of series and left, element-wise (binary operator div).

sample([n, frac, random_state])

std([numeric_only])

Return standard deviation for a Series

sub(right)

Return subtraction of series and right, element-wise (binary operator sub).

subtract(right)

Return subtraction of series and right, element-wise (binary operator sub).

sum([numeric_only])

Return the sum of the Series values

tail([n])

to_numpy()

Not implemented.

to_pandas([show_progress])

to_string([buf, na_rep, float_format, ...])

Render a string representation of the Series.

truediv(right)

Return floating division of series and right, element-wise (binary operator truediv).

unique()

Returns all unique values within a Series.

value_counts([es_size])

Return the value counts for the specified field.

var([numeric_only])

Return variance for a Series

Attributes

dtype

Return the dtype object of the underlying data.

dtypes

Return the pandas dtypes in the DataFrame.

empty

Determines if the Series is empty.

es_dtype

Return the Elasticsearch type of the underlying data.

es_dtypes

Return the Elasticsearch dtypes in the index

es_field_name

Returns es_field_name: str Return the Elasticsearch field name for this series

index

Return eland index referencing Elasticsearch field to index a DataFrame/Series

name

ndim

Returns 1 by definition of a Series

shape

Return a tuple representing the dimensionality of the Series.

size

Return an int representing the number of elements in this object.