COLLAPSE ALL
  • Home
  • About Pixie
    • Pixie Overview
    • Data Sources
    • How Pixie uses eBPF
    • Roadmap
    • FAQ
    • Troubleshooting
  • Installing Pixie
    • Requirements
  • Using Pixie
    • Using the Live UI
    • Using the CLI
    • Using the API
  • Tutorials
  • Reference
    • Architecture
    • PxL
      • DataFrame
        • DataFrame.__getitem__
        • DataFrame.agg
        • DataFrame.append
        • DataFrame.ctx.__getitem__
        • DataFrame.DataFrame
        • DataFrame.drop
        • DataFrame.filter
        • DataFrame.groupby
        • DataFrame.head
        • DataFrame.map
        • DataFrame.merge
        • DataFrame.rolling
        • DataFrame.stream
        • px.debug
        • px.display
        • px.export

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.