I have an example dataframe as given below:
df =
index Value Name
2019-01-01 07:53:53 10 S_1.M_01
2019-01-01 08:33:52 20 S_1.M_02
2019-01-01 09:13:52 30 S_1.M_03
2019-01-01 09:53:52 40 S_1.M_01
2019-01-01 10:33:52 50 S_1.M_02
2019-01-01 11:13:53 60 S_1.M_03
... ... ...
2019-09-08 15:38:52 100 8157_S2
Now I want to extract to those columns with name Name and create outputs. How to extract those rows with same names?
My code:
df_grp = iv_df['element'].unique
This did not yield any result.
I want to achieve something like this below different outputs
Output1:
index Value Name
2019-01-01 07:53:53 10 S_1.M_01
2019-01-01 09:53:52 40 S_1.M_01
Output2:
index Value Name
2019-01-01 08:33:52 20 S_1.M_02
2019-01-01 10:33:52 50 S_1.M_02
Output3:
index Value Name
2019-01-01 09:13:52 30 S_1.M_03
2019-01-01 11:13:53 60 S_1.M_03
How to achieve this?