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.filter

Returns a DataFrame with only those rows that match the condition.

Filters for the rows in the DataFrame that match the boolean condition. Will error out if you don't pass in a boolean expression. The functions available are defined in UDFs.

Arguments

NameTypeDescription
keyScalarExpressionDataFrame expression that evaluates to a bool. Filter keeps any row that causes the expression to evaluate to True.

Returns

px.DataFrame: DataFrame with only those rows that return True for the expression.

Examples

df = px.DataFrame('http_events')
# Filter for only http requests that are greater than 100 milliseconds
df = df[df['resp_latency_ns'] > 100 * 1000 * 1000]

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