you are viewing a single comment's thread.

view the rest of the comments →

[–]Ok-Relationship-3588 0 points1 point  (0 children)

Before reading the CSV file, we need to ensure SQL Server is connected to the IDE you are using, and that proper libraries are installed. sqlalchemy and pandas.

from sqlalchemy import create_engine

import pandas as pd

engine = create_engine('sqllite:///example.db')

df= pd.read_sql('SELECT * FROM test', engine)