'Pandas Dataframe (with Date as Header Column) to MySQL
I have been trying to send/export a particular set of data from an excel file to Python to MySQL. The data from an excel file looks like the one in the screenshot shown below: Data in Excel
After using 'iloc' and some other pandas functions i get it converted it into the one below: Data in Python Pandas
Now the problem really is with the Dataframe header column which is a date. I want this data, when exported to MySQL to look like: Data in MySQL
I have tried converting Date to both string or datetime.datetime etc but so far have not been able to export it to MySQL the way I want to.
Any help would be very much appreciated. Thanks.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
