Existing Dataframe :
PushedDate ID_number
amin amax
index
7874 2022-02-18 2022-02-22 7874
4979 2021-10-06 2021-10-11 4979
I am looking for the dataframe , where i call use amin and amax as seperate columns :
PushedDate_min PushedDate_max ID_number
index
7874 2022-02-18 2022-02-22 7874
4979 2021-10-06 2021-10-11 4979
Existing dataframe was obtained using below code :
aa = df.groupby(['ID_number']).agg({'PushedDate': [np.min, np.max]})
aa[aa.index.name] = aa.index
aa.index.names = ['index'] # renaming the index