After I read a file and parse the dates the date format changes within the dataframe.
Find below my code.
v2x = r'E:\Model\Data\v2x.csv'
outfile = r'E:\Model\ModelSpecific\Input_shat2.txt'
df_data = pd.read_csv(file_name,parse_dates=[0], index_col=0)
df_v2x = pd.read_csv(v2x, parse_dates=[0], sep=",")
print(df_v2x[4800:5000])
The correct format should be '%y-%m-%d'
And the print output:
4988 2018-07-08 V2TX 12.6265 --> Wrong Format
4989 2018-08-08 V2TX 12.8654
4990 2018-09-08 V2TX 12.4882
4991 2018-10-08 V2TX 15.1113
4992 2018-08-13 V2TX 15.9406 --> Right Format
4993 2018-08-14 V2TX 15.8610
4994 2018-08-15 V2TX 18.4755
4995 2018-08-16 V2TX 16.2633
Thanks for your help!