EXPAND ALL
  • Home

DataFrame.head

Return the first n rows.

Returns a DataFrame with the first n rows of data.

Arguments

NameTypeDescription
nintThe number of rows to return. If not set, default is 5.

Returns

px.DataFrame: DataFrame with the first n rows.

Examples

df = px.DataFrame('http_events')
# Keep only the first 100 http requests.
df = df.head(100)

This site uses cookies to provide you with a better user experience. By using Pixie, you consent to our use of cookies.