DataFrame.head(n: int = 5) → eland.dataframe.DataFrame

Return the first n rows.

This function returns the first n rows for the object based on position. The row order is sorted by index field. It is useful for quickly testing if your object has the right type of data in it.

n: int, default 5

Number of rows to select.


eland DataFrame filtered on first n rows sorted by index field


>>> df = ed.DataFrame('http://localhost:9200', 'flights', columns=['Origin', 'Dest'])
>>> df.head(3)
                            Origin                                          Dest
0        Frankfurt am Main Airport  Sydney Kingsford Smith International Airport
1  Cape Town International Airport                     Venice Marco Polo Airport
2        Venice Marco Polo Airport                     Venice Marco Polo Airport
[3 rows x 2 columns]