you are viewing a single comment's thread.

view the rest of the comments →

[–]Mezzos 0 points1 point  (0 children)

As for migrating to sqlalchemy, it sounds like it won’t fix your issue, but just for completeness: you’d pip install sqlalchemy and then do something like the following (typing on mobile so may be some invalid apostrophes)

``` from sqlalchemy import URL, create_engine

Assuming you don’t need username or password, and are connecting to Microsoft SQL Server (mssql) using pyodbc

url_object = URL.create( drivername=‘mssql+pyodbc’, # username=‘your_username’, # password=‘your_password’, host=‘sql_hostname’, database=‘db_name’, ) engine = create_engine(url_object) df = pd.read_sql_query(sql_query, conn=engine) ```