0

enter image description here

Hello, does someone have an idea to help to split a column in two columns. I have duplicates in my Id columns so i have some difficulties if someone can lay me some track, i would appreciate a lot.

there is a png to illustrate my situation

ayakuza91
  • 1
  • 1

1 Answers1

0

You can use the groupby function and then aggregate the values.

df = df.groupby('Id').agg({'Date': ['min', 'max']}).reset_index()