I am new to Python and WampServer. I want to retrieve values from csv files (more than 10 GB) and, after some processing, store them in a MySQL database using Wamp efficiently.
I have installed Python and Django on Wamp server, and have checked the previous posts, but since I am a complete novice in this field, I am not getting much from them.
Can somebody please suggest appropriate resources for a beginner like me? I have already looked into Python Power! The Comprehensive Guide, but I did not get much from it. Any help would be appreciated.
You can read data from CSV files using the built-in
csvmodule. For example:You can write data to MySQL using the
MySQL-pythonpackage, which conforms to the Python database API and is documented here. For example, after you’ve installed this package, you can do this kind of thing:However, if you’re using Django to manage the database, then you may be better off using Django’s own database interface, for example
Model.saveto save an instance of a model to the database.