![]() > df = pd.DataFrame()ĬODE - Throws error as expected > pd.to_datetime(df, format = '%d-%m-%Y')įile "/home/vishnudev/anaconda3/envs/sumyag/lib/python3.7/site-packages/pandas/core/tools/datetimes.py", line 448, in _convert_listlike_datetimes There are multiple intuition techniques that you can apply to your data, like, if the data is originated from the United States, the common date format is MM/DD/YYYY or if India it is DD-MM-YY. So, the key here is verifying the dataset and it's origins. Now just by looking at the date can you say exactly what date it is? The answer is no, because, unless you know how the date is formatted or how the date was created i.e whether Day-Month-Year or Month-Day-Year, you can't really say whether the above date is 1st February 2020 or 2nd January 2020. ![]()
0 Comments
Leave a Reply. |