0

I have a dataframe with several columns, one of which has values ​​ranging from '1' to '4'.

From this dataframe I would like to make 4.

A df1 where there are all the lines where there is a '1' a 2nd with all the lines including a '2' and so on.

Isoka05m
  • 33
  • 6
  • Another dupe: [Pandas split DataFrame by column value](https://stackoverflow.com/q/33742588/1782792). You can just do `splits = [sub_df for _, sub_df in df.groupby('column')]`. – jdehesa Jun 09 '20 at 10:52
  • df1 = df[df['Sales'] >= s] – Isoka05m Jun 09 '20 at 12:07

0 Answers0