I'm trying to write a Pandas dataframe to a SQLite table but using to_sql keeps writing only the column headings instead of all of the records in the data frame.
import pandas as pd
import pandas.io.sql as pd_sql
import sqlite3 as lite
rTable.to_sql("SQL_Table", con, flavor='sqlite', index=True, index_label="Index")
Any ideas?
Aucun commentaire:
Enregistrer un commentaire