I am deploying a simulation model written in Python using Django.
The input of the simulation model is a multi-sheet Excel file. Currently the simulation model runs locally by reading each sheet and saving the contents of each sheet to a Pandas DataFrame, which are then used as inputs.
I have a web app built in Django and want to link it to the simulation model such that a user can upload the multi-tab Excel file via the web app. In the back-end I want the DataFrames created from each Excel sheet to be written to a SQL Database. Every time a new Excel file is uploaded, the new DataFrames must also be saved. As such a user can choose via the web app which input Excel file to run the simulation on.
- Is it possible to write the DataFrames to the SQL database directly or do they have to be saved as Django Models?
- And if so, which would be the best option?