AttributeError: ‘Index’ object has no attribute ‘strftime’ & TypeError: ‘<' not supported between instances of 'Timestamp' and 'str'
In DataFrame df
, I am having index column as Timestamp
in it some values are in format: %Y-%m-%d %H:%M:%S.%f
and other values in format: %Y-%m-%d %H:%M:%S
due to which I am facing issue in Sorting the index crudeoilm =crudeoilm.sort_index()
as well and Data Fomat it also different.