I've done a bit of googling, and I can't find much information on this. I have a MySQL table that I'm pushing data to that has a key column. The only writing to this table is from my python script. I know you can use "auto-increment" columns to keep the key generation a sanitary process. I also know that when you insert into the table using normal MySQL, you're supposed to push a SQL NULL
in to the row to get it to auto-increment properly. How would I set up the rows to have the proper NULL
? Can I use pandas NaN
s or NoneType
s?
E: Here's a sample setup.
Table: Logbook
| Key | Date | Notes |
| 1 | 02-18 | Successful |
| 2 | 03-18 | Failure |
Using SQL to insert to the table:
INSERT INTO Logbook
VALUES (NULL, 04-18, Failure)
I want to accomplish this with pd.to_sql