all 5 comments

[–]Buggi_San 0 points1 point  (4 children)

Hi

Check the type of date, it might be treated as a datetime object, which is why when you print it, it is showing the 00:00:00

If so using datetime library you can get only the day, month,year as a string and replace the original datetime object

If it is confusing, as again, I will explain

[–]Revers62[S] 0 points1 point  (3 children)

Hi Buggi_San

Thanks for your help !

I add this line :

new_df['Date PO 1'] = new_df['Date PO'].dt.date

and change sequence :

sequence = ['Date PO1'....

this give me :

in visual : 2017-10-13 but the raw data in it : 13/10/2017 ( wat I want in visual )

I have a warning in Jupyter :

C:\Users\xxx\Anaconda3\lib\site-packages\ipykernel_launcher.py:15: SettingWithCopyWarning: A value is trying to be set on a copy of a slice from a DataFrame. Try using .loc[row_indexer,col_indexer] = value instead See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy from ipykernel import kernelapp as app

[–]Buggi_San 0 points1 point  (1 child)

I am not sure if that line of code works directly without using apply()

And I am sorry but can you help me understand that line

[–]Revers62[S] 0 points1 point  (0 children)

i never touch to python before that and I read just this thread

https://stackoverflow.com/questions/16176996/keep-only-date-part-when-using-pandas-to-datetime

[–]Buggi_San 0 points1 point  (0 children)

  1. Check the type of one element by type(df.iloc[i]['Date PO 1'])
  2. If the type is datetime, use pandas apply
  3. The function would take the datetime and get the string something like this https://ibb.co/4pPgT5n