The original code

df.columns = df.columns.astype('M8[D]')
Copy the code

Modified to

df.columns = df.columns.astype('M8[ns]')
Copy the code