I have converted pdf tables data into CSV in my Django projects using Camelot and it automatically stores in my root directory. now how I'm gonna put my CSV data into my MySQL database? I have created my Model as the CSV file row's name. can anyone help to give ideas?
'''
def tables_extract(file_name):
filename_with_path = '/pdfs/{}'.format(file_name)
basename = os.path.basename(filename_with_path)
basename_without_ex = os.path.splitext(basename)[0]
tables = camelot.read_pdf(filename_with_path, pages="1-end")
table= tables[2].df
csv = table.to_csv("{}.csv".format(basename_without_ex))
return csv
'''