I'm stumped at an error that appears whenever i try to create a database table from csv file

50 Views Asked by At

I've uploaded the CSV file in the session storage of Google Colab and tried to create a database table from that CSV file, but I always encounter the error below

with open('Cities.csv') as f: Cities = pd.read_csv(f, index_col=0)
%sql drop table if exists Cities;
%sql persist Cities

ERROR

* sqlite://
  Done.
* sqlite://
  (sqlite3.OperationalError) near "persist": syntax error
  \[SQL: persist Cities\]
  (Background on this error at: https://sqlalche.me/e/20/e3q8)
0

There are 0 best solutions below