Pandas convert date

Question:

Hey guys I need some help, my date is not in the correct format.

I made a function to convert all columns of dates it works but, it gives a return of SettingWithCopyWarning.

Origin(https://i.stack.imgur.com/5xlT4.png)

function(https://i.stack.imgur.com/hZe9f.png)

warning(https://i.stack.imgur.com/iglZB.png)

can you tell me how to solve this I’ve tried in several ways.

Asked By: Igor Souza

||

Answers:

If your code is working and is doing its job you can always ignore the error by adding this at the top. I would not recommend it in a very large scale project.

from pandas.core.common import SettingWithCopyWarning

warnings.simplefilter(action="ignore", category=SettingWithCopyWarning)
Answered By: GhettoCoder
Categories: questions Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.