Skip to main content

Query Data from a Private DataBase and save it in a Pandas DataFrame

Project description



This package query data from any SQL Server Database and parse it into a Pandas Dataframe it can be useful for pipelines process and speed up your development process.


from SQLServerToPandasDataFrame import createConnection, runQuery

Base_Query = "select * from [DataBase].dbo.Table"

user = "USER_NAME"
password = "PASSWORD"

conn = createConnection("MyDataBase", server, user, password)
print(runQuery(query1, conn))


This package performs by default all the connections to a SQL Server using ODBC Driver 17 for SQL Server driver. if you wanna use a different driver, please replace add the driver parameter in create Connection method.

conn = createConnection("MyDataBase", server, user, password, driver = "DRIVER OF YOUR PREFERENCE")
conn = createConnection("MyDataBase", server, user, password, driver = "ODBC Driver 17 for SQL Server")

We use Pyodbc as ODBC access library, for more driver options please ckeck the documentation PyODBC Documentation.


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for SQLServerToPandasDataFrame-germanandresjejencortes, version 0.0.2
Filename, size File type Python version Upload date Hashes
Filename, size SQLServerToPandasDataFrame_germanandresjejencortes-0.0.2-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size SQLServerToPandasDataFrame-germanandresjejencortes-0.0.2.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page