If I have it infer the format when converting a column in pandas to datetimes, is there a way I can go backwards and retrieve the formatting?
E.g. if I have columns full of date times like "02-09-1990 10:32PM" and I convert that with with pandas.to_datatime, is there a way to retrieve the format it used out of there?
I dug into the functions that to_datetime uses to infer, namely:
from pandas._libs.tslibs.parsing import _guess_datetime_format
from pandas.core.tools.datetimes import _guess_datetime_format_for_array
but I can't get them to actually work and I can't step into their code to figure out why in PyCharm.
Anyone have any ideas on this? Thank you.