movingpandas.TrajectoryCollection.filter#
- TrajectoryCollection.filter(property_name, property_values)#
Filter trajectories by property
A property is a value in the df that is constant for the whole trajectory. The filter only checks if the value on the first row equals the requested property value.
- Parameters:
property_name (string) – Name of the DataFrame column containing the property
property_values (list(any)) – Desired property values
- Returns:
Trajectories that fulfill the filter criteria
- Return type:
Examples
>>> filtered = trajectory_collection.filter('object_type', ['TypeA', 'TypeB'])