I have a Dataframe in python, with the data coming from a csv. In the column "Date" I have a date (:)) but I don't know the date format. How can I detect it?
e.g.: I can have 05/05/2022. this can be M/D/Y or D/M/Y. I can manually understand it by looking at other entries, but I wish I can do it automatically.
Is there a way to do so? thank you
datetime.strptime requires you to know the format. trying (try - exept)-commands isn't good since there are so many different format I can receive.
it would be nice to have something that recognizes the format...
Update: Thank you for the first answers, but the output I would like to have is THE FORMAT of the date that is used in the column. Knowing also the fact that the format is unique within each column