Answers for "setup code for pandas in python"

4

install pandas

sudo pip3 install pandas
Posted by: Guest on June-23-2020
0

setup code for pandas in python

# Read Excel sheet with pandas and using Sqlite DB

# Setup code 

engine = create_engine('sqlite://', echo=False)
df = pd.read_excel(file, sheet_name=sheetname)
df.to_sql("test", engine, if_exists="replace", index=False)
results = engine.execute("Select * from test")
final = pd.DataFrame(results, columns=df.columns)
Posted by: Guest on February-03-2021

Python Answers by Framework

Browse Popular Code Answers by Language