Skip to main content

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

Project description

MicrosoftSQLServerToPandasDataFrame

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.

Usage

from SQLServerToPandasDataFrame import CreateQuery, createConnection, runQuery

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

server = "HOST_DIRECTION"
user = "USER_NAME"
password = "PASSWORD"

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

Settings

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.

Collaborators

Project details


Download files

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

Source Distribution

Built Distribution

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page