fetch row where column is equal to a value pandas

df.loc[df['column_name'] == 'value']

Here is what the above code is Doing:
1. We’re selecting the column_name column from the df DataFrame.
2. We’re comparing the column_name column to the value ‘value’.
3. We’re telling Pandas to return all rows where the column_name column is equal to ‘value’.