I have a code in jupyter that what I want to do is insert the bd, it works well with the example that I have commented, but when doing it with the real csv, I deployed an error.
import pandas as pd
df = pd.read_csv('4763.csv',header=[2],delimiter=";")
df
from sqlalchemy import create_engine
#df = pd.DataFrame({'name' : ['User 1', 'User 2', 'User 3']})
engine = create_engine("mysql+pymysql://{user}:{pw}@localhost/{db}"
.format(user="root",
pw="",
db="remu2"))
df.to_sql(con=engine, name='csv',if_exists='append')
this is the error
InternalError: (1054, "Unknown column 'index' in 'field list'")
The above exception was the direct cause of the following exception:
InternalError Traceback (most recent call last)