eland.DataFrame.index#

property DataFrame.index: Index#

返回 eland 索引,引用 Elasticsearch 字段以索引 DataFrame/Series

返回值#

eland.Index

注意 eland.Index 与 pandas.Index 相比,API 非常有限

另请参阅#

pandas.DataFrame.index pandas.Series.index

示例#

>>> df = ed.DataFrame('http://localhost:9200', 'flights')
>>> assert isinstance(df.index, ed.Index)
>>> df.index.es_index_field
'_id'
>>> s = df['Carrier']
>>> assert isinstance(s.index, ed.Index)
>>> s.index.es_index_field
'_id'