human
Select rows from a DataFrame based on values in a column in pandas
assistant
Here is some code to select rows of dataframe `df` whose value for column `A` is `foo`

print(df.loc[df['A'] == 'foo'])

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.