EXPAND ALL
  • Home

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.