select rows from a dataframe based on values in a column in pandas,print(df.loc[df['A'] == 'foo'])