enter image description here I am trying to insert a csv file into database by python. The database is oracle . Below is my code csv file name is PatientStatus and Table name is AIW1 import cx_Oracle as cn import pandas as pd # pip install pandas
```
df = pd.read_csv('PatientStatus.csv')
columns = [ 'UNITNAME' ,
'PATIENTSTATUS', 'PATIENTCOUNTS', 'COUNTRY','STATENAME','CITYNAME']
df_data = df[columns]
records = df_data.values.tolist()
conn = cn.connect(user="", password="",dsn="")
sql_insert = '''
INSERT INTO AIW1
VALUES (?, ?, ?, ?, ?, ?, ?,?,?)
'''
cursor = conn.cursor()
cursor.executemany(sql_insert, records)
cursor.commit();
print('Task is complete.')
cursor.close()
conn.close()
```
I am getting the
DatabaseError
Traceback (most recent call last) C:\Users\SOFTWA~1.SUP\AppData\Local\Temp/ipykernel_956/3684779769.py in 21 ''' 22 cursor = conn.cursor() ---> 23 cursor.executemany(sql_insert, records) 24 cursor.commit(); 25 print('Task is complete.')
DatabaseError: ORA-01036: illegal variable name/number
Thanks in advance