-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DOC: Pandas.to_sql has the following issues #52488
Comments
Please add reproducible examples |
`import pandas as pd def mysqlConnetNew(db): def run_sql_query(engine,query_sql_str): data1 = [ data2 = [ data3 = [ Link MySQLengine = mysqlConnetNew('TB_HPXX') CREATE TABLEstrsql = "CREATE TABLE if not exists test_table (column1 VARCHAR(50) PRIMARY KEY,column2 VARCHAR(30) )" run testdf1.to_sql(name = 'test_table',con=engine,if_exists='append',index=False) |
If I understand it correctly this issue is rather an But this feature request was already dismissed in #15988 so this one may be closed as well. |
@phofl I think this issue might be closed due to the reasons above. |
Pandas version checks
main
hereLocation of the documentation
Pandas.to_sql
Documentation problem
1、Unable to successfully write data when MySQL table has primary key
2、Can you add write methods for "updata" and "Insert IGNORE" so that when writing to a MySQL data table with a primary key, it can successfully overwrite the updated data or incrementally write the data
3、When the fields in the data table do not exist in the MySQL table, can the corresponding fields be automatically added to the MySQL table and the data be written to the MySQL table
Suggested fix for documentation
1、Unable to successfully write data when MySQL table has primary key
2、Can you add write methods for "updata" and "Insert IGNORE" so that when writing to a MySQL data table with a primary key, it can successfully overwrite the updated data or incrementally write the data
3、When the fields in the data table do not exist in the MySQL table, can the corresponding fields be automatically added to the MySQL table and the data be written to the MySQL table
The text was updated successfully, but these errors were encountered: