Storing data in flat files can be OK. But for a lot of applications you really need a database.
Python provides a neat little database out of the box called SQLite.
This video goes through a simple script that puts spreadsheet data into one of these SQLite databases.
First, we import our spreadsheet data (in CSV format) using Pandas. From that Pandas data frame we prepare the data ready for injection into our SQL database.
Then, the script establishes a connection to the database (creating it if it doesn't exist), and creates a cursor object. The cursor is the thing that allows us to work with the database (reading, writing and deleting data).
After that, all that remains is to actually inject the data into our database and we are done!
As a final step, we check to see it has worked by using a database browser (DB Browser) to view the contents of our database.
SQLite Python docs: https://docs.python.org/3/library/sql...
SQL cheat sheet: https://www.sqlitetutorial.net/sqlite...
DB Browser for SQLite: https://sqlitebrowser.org/
Article breaking down databases and spreadsheets: https://365datascience.com/tutorials/...
Auf dieser Seite können Sie das Online-Video How To Put CSV Data Into An SQLite DB With Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer Make That Work 11 September 2022 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 1,116 Mal angesehen und es wurde von 13 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!