I have a dataframe with timestamp as index. I want to filter out the rows with similar timestamp and print it out. For example,
Value_1 Value_2
timestamp
2022-03-22 17:31:02 23 30
2022-03-22 17:31:02 25 40
2022-03-22 17:31:04 24 0.2
2022-03-22 17:31:05 21 90
2022-03-22 17:31:05 20 0.1
I want to filter out the rows with similar timestamps as shown below.
Value_1 Value_2
timestamp
2022-03-22 17:31:02 23 30
2022-03-22 17:31:02 25 40
2022-03-22 17:31:05 21 90
2022-03-22 17:31:05 20 0.1
I tried using melt and groupby. It does not give me the desired results. Could someone help me with it?
Thanks.