I am trying to create a for loop wherein a new dataframe is created based on a conditional statement of a column, but all I end up with is are only the column names without any values.
What I am doing now is the following:
for i in range(3):
df_new = df[df['col'] == i]
but this does not seem to work.