I have a dataframe which looks like this:
ID Unit Semester Note BNF
0 3537 143066.0 4010 2.3 5
1 3537 143067.0 4010 m.E. E
2 75 113142.0 4011 5.0 5
3 3726 113142.0 4011 3.3 5
4 5693 113142.0 4011 5.0 5
this dataframe contains three categories. These categories are based on the values in the "Semester"-column. There are values which start with 113, 143 and 153.
Now I want to split this whole dataframe that I get three new dataframes for every categorie.
I tried to convert the column to string and work with 'startswith'.
mi = df[df['Unit'].apply(str)]
mi = df[df['Unit'].startswith('143')]
but that didn't work.
I hope someone could help me. Thanks a lot!