Last answered:

08 Aug 2023

Posted on:

04 Aug 2023

0

Resolved: In 1-11- Got an error when i tried to convert them into pandas timestamps?

5 answers ( 1 marked as helpful)
Posted on:

04 Aug 2023

0

using the ,dayfirst = True, seems to have done the trick... .

Posted on:

04 Aug 2023

0

Only difference now, is that in the final head result, instead of not a number (NaN), position 4 gives us "not a timestamp" (NaT). 

Posted on:

04 Aug 2023

0

Posted on:

04 Aug 2023

0

But probably this wouldnt be enough in a business setting right? They would ask me to clean the table more thoroughly... .

Instructor
Posted on:

08 Aug 2023

1

Hi Panagiotis!

Thanks for sharing this information.


Another way of fixing the issue would be to adjust your format string to match the date data. Like this:

pd.to_datetime(lending_co_data['StartDate'], format="%d/%m/%Y" )


Hope this helps.

Best,

Ivan

Submit an answer