Afternoon,
I have imported some data from excel to pandas using:
File = 'C:/Users/Ben/FTSEAXX_Utilities_Price.xlsx'
xlsx = pd.ExcelFile(File)
df = pd.read_excel(xlsx, 'Price_Data')
This has imported correctly, however the date is being displayed differently to the excel input.
excel:
Identifier Company Name 31/12/2009 08/01/2010 15/01/2010 22/01/2010 29/01/2010
Python:
Identifier Company Name 2009-12-31 00:00:00 2010-01-08 00:00:00 2010-01-15 00:00:00 2010-01-22 00:00:00 2010-01-29 00:00:00
How do i change it to get back to the more simple excel format?
thanks
Ben
dtypeisdatetimethen it's just a display issue as it's showing time component and well as the system date format, you can change this to a different string representation but the dtype will change from datetime to str which is probably not what you want