filter dataframe
The filter dataframe
command allows you to create a new dataframe by filtering out certain rows from a loaded dataframe to create a new dataframe.
Syntax
filter dataframe
Parameters
In the notebook, specify the name for the new dataframe.
Select the source dataframe.
Specify a SQL query to select rows from the source dataframe. The query can contain valid SQL WHERE predicates to do the filtering. Note that you must select all the columns and cannot create new columns in the query.
Example
In this example, a new dataframe is created that only selects rows where the passenger_count is more than 2:

Last updated