Assuming you have data in a pandas DataFrame, you can filter rows that contain the string 'o3' in a specific column using the str.contains()
method.
Here's an example that filters out all rows where 'o3' is not found in the 'column_name' column:
main.py207 chars8 lines
This will create a new DataFrame df_filtered
with only rows where 'o3' is found in the specified column. You can then use this filtered DataFrame for further analysis or export it to a new file with to_csv()
method:
main.py92 chars3 lines
gistlibby LogSnag