I am trying to filter a Dataframe based on value in a column
cust_id, prod_type
101, prod_A
102, prod_A
102, prod_B
103, prod_F
103, prod_A
104, prod_D
I am trying to filter based on column index as below:
df.loc[df.columns[1].eq('prod_A')]
It throws an error AttributeError: 'str' object has no attribute 'eq'