Skip to content

Instantly share code, notes, and snippets.

@lyleaf
lyleaf / insert2DB.py
Last active November 3, 2022 04:33
Insert pandas dataframe to Oracle database using cx_Oracle
"""
ATTENTION:
When using executemany with a list of tuples, the numbers representing the rows has to be strictly from 1 to the last. Or else it won't work.
I really don't understand why.
"""
import cx_Oracle
from parserFWF import getConfigDF
HOTEL_CONFIG = getConfigDF() #dataframe