how to select rows in a dataframe based on column value in pandas in loop code example Example: panda select rows where column value inferior to df.loc[df['column_name'] == some_value]