eland.DataFrame.head

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.

Parameters
n: int, default 5

Number of rows to select.

Returns
eland.DataFrame

eland DataFrame filtered on first n rows sorted by index field

Examples

>>> df = ed.DataFrame('localhost', '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
<BLANKLINE>
[3 rows x 2 columns]