Q:

Importing excel file with swapped date formats python

I have an excel file where the data starts with format MM/DD/YYYY hh:mm:ss, later after few entries it switches back to DD/MM/YYYY hh:mm:ss. This sequence happens a couple of times in the data set. Is there a way to import this into python? The convert to datetime by specifying format doesn't work because there are different formats. 
The dataframe looks like this:

A:

If the datetimes are actual datetimes in Excel as well, re-format them first, and then read into Python. Select the whole column, open the format window (CTRL + 1 on Windows), go to the "Number" panel, choose "Date," and then choose an appropriate format for your data.
With the dates all in the same format, now read the file into Python using pandas or another library.

