subset df based on column value code example
Example 1: fetch row where column is equal to a value pandas
df.loc[df['column_name'] == 'value']
Example 2: pandas column filter
filter = df['column']!= 0
df = df[filter]
df.loc[df['column_name'] == 'value']
filter = df['column']!= 0
df = df[filter]