Skip to content

bodo.pandas.BodoSeries.head

BodoSeries.head(n=5) -> BodoSeries

Returns the first n rows of the BodoSeries.

Parameters

n : int, default 5: Number of elements to select.

Returns

BodoSeries

Example

import bodo.pandas as bodo_pd
import pandas as pd

df = pd.DataFrame(
        {
            "A": pd.array([1, 2, 3, 7] * 3, "Int64"),
        }
    )

bdf = bodo_pd.from_pandas(df)
bodo_ser_head = bdf.A.head(3)
print(type(bodo_ser_head))
print(bodo_ser_head)

Output:

<class 'pandas.core.series.Series'>
0    1
1    2
2    3
Name: A, dtype: Int64