Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

pyodbc sql save pandas dataframe

import sqlalchemy
import pyodbc
engine = sqlalchemy.create_engine("mssql+pyodbc://<username>:<password>@<dsnname>")

# write the DataFrame to a table in the sql database
df.to_sql("table_name", engine)
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #pyodbc #sql #save #pandas #dataframe
ADD COMMENT
Topic
Name
8+1 =