select rows of dataframe `df` whose value for column `A` is `foo`,print(df.loc[df['A'] == 'foo'])