split dataset based on column values in a list pandas code example Example: dataframe partition dataset based on column s = 30 df1 = df[df[0] >= s]