Date Format is not properly come in pandas

18 Views Asked by At
import pandas as pd 
df1 = pd.read_excel(r"E:\Taral\DataScience\Project\msdData.xlsx",parse_dates= ['Date'],        dayfirst =True)
print(df1)


print(df1)

OUTPUT -

     Sr. No.                 Date       Versus  ...     Aggr    Avg   S/R.1
0        1.0           23/12/2004   Bangladesh  ...      0.0   0.00    0.00
1        2.0           26/12/2004   Bangladesh  ...     12.0   6.00  100.00
2        3.0           27/12/2004   Bangladesh  ...     19.0   9.50  135.71
3        4.0  2005-02-04 00:00:00     Pakistan  ...     22.0   7.33  104.76
4        5.0  2005-05-04 00:00:00     Pakistan  ...    170.0  42.50  118.06

Date should comes properly but its showing wrong format, as seen in output

df1 = pd.read_excel(r"E:\Taral\DataScience\Project\msdData.xlsx",parse_dates= ['Date'],dayfirst = True)

But its not working.

Please help.

0

There are 0 best solutions below