When uploading a bunch of CSVs to my Flask application, I'd like to be able to bulk entry these into my sqlalchemy table.
status | medium | landing page
converted | google | www.example.com
...
Pandas has a method to_sql which can bulk insert the CSVs into the database, however the only duplicate check is to see if the table exists in the database already. I need to check if the individual entries are already inside the database and only upload new entries.
Currently, I know I can solve this by iterating through the pandas dataframe, but since iterating through a dataframe is not usually recommended, I'm wondering if there is a more efficient way to solve this problem. Any suggestions?