How do I merge data with similar values reading from an excel file?
import pandas as pd
import numpy as np
df = pd.read_excel("testfile.xlsx")
print(df)
File example: testdata.xlsx
Identifier Dates
123456 1/1/2021
789101 2/2/2021
221342 3/3/2021
231344 1/1/2021
134562 2/2/2021
135650 2/2/2021
135677 2/2/2021
2246 1/1/2021
24682 3/3/2021
245684 1/1/2021
Output data wanted (merge the data corresponding to a certain date):
2/2/2021 789101 134562 135650 135677
1/1/2021 245684 2246 231344
3/3/2021 24682 221342
groupby