eland.DataFrame.to_numpy#

DataFrame.to_numpy() None#

Not implemented.

In pandas this returns a Numpy representation of the DataFrame. This would involve scan/scrolling the entire index.

If this is required, call ed.eland_to_pandas(ed_df).values, but beware this will scan/scroll the entire Elasticsearch index(s) into memory.

See Also#

pandas.DataFrame.to_numpy eland_to_pandas

Examples#

>>> ed_df = ed.DataFrame('http://localhost:9200', 'flights', columns=['AvgTicketPrice', 'Carrier']).head(5)
>>> pd_df = ed.eland_to_pandas(ed_df)
>>> print(f"type(ed_df)={type(ed_df)}\ntype(pd_df)={type(pd_df)}")
type(ed_df)=<class 'eland.dataframe.DataFrame'>
type(pd_df)=<class 'pandas.core.frame.DataFrame'>
>>> ed_df
   AvgTicketPrice           Carrier
0      841.265642   Kibana Airlines
1      882.982662  Logstash Airways
2      190.636904  Logstash Airways
3      181.694216   Kibana Airlines
4      730.041778   Kibana Airlines

[5 rows x 2 columns]
>>> pd_df.values
array([[841.2656419677076, 'Kibana Airlines'],
       [882.9826615595518, 'Logstash Airways'],
       [190.6369038508356, 'Logstash Airways'],
       [181.69421554118, 'Kibana Airlines'],
       [730.041778346198, 'Kibana Airlines']], dtype=object)