Database

· Database
#10.5.4 MySQLCursor.execute() Method cursor.execute(operation, params=None, multi=False) iterator = cursor.execute(operation, params=None, multi=True) This method executes the given database operation (query or command). The parameters found in the tuple or dictionary params are bound to the variables in the operation. Specify variables using %s or %(name)s parameter style (that is, using format..
· Database
def input_sql(data, input_table_name, pk=None): """ data: Input Data DataFrame input_table_name: Table name Str pk: Primary Key Name List """ colnames = list(data.columns) INPUT_NAME = '' for col in colnames: INPUT_NAME = INPUT_NAME + col.upper() +',' INPUT_NAME = INPUT_NAME[:-1] VALUES_INPUT = '' for col in colnames: VALUES_INPUT = VALUES_INPUT +'"%s",' VALUES_INPUT = VALUES_INPUT[:-1] sql = f"..
다했다
'Database' 카테고리의 글 목록 (3 Page)