I want to store JSON Data into MySQL Database using Python.
I used dataframe
of pandas
. I found that to_sql()
can do this job easily.
Python Code:
jdata=json.loads(json_data)
df=pandas.DataFrame(jdata)
df.to_sql(con=con, name='crashTable', if_exists='replace', flavor='mysql')
Output:
TypeError: to_sql() got an unexpected keyword argument 'flavor'
I got this error message. How to resolve this error?