I have a 2D array (similar to table in MySQL), for instance,
+------------------+------------------+-------------------+------------------+
| trip_id | service_id | route_id | shape_id |
+------------------+------------------+-------------------+------------------+
| 4503599630773892 | 4503599630773892 | 11821949021891677 | 4503599630773892 |
| 4503599630773894 | 4503599630773892 | 11821949021891677 | 4503599630773892 |
| 4503599630773896 | 4503599630773892 | 11821949021891677 | 4503599630773892 |
| 4503599630773898 | 4503599630773892 | 11821949021891677 | 4503599630773892 |
| 4503599630773900 | 4503599630773892 | 11821949021891677 | 4503599630773892 |
| 4503599630773902 | 4503599630773892 | 11821949021891677 | 4503599630773892 |
| 4503599630810392 | 4503599630773892 | 11821949021891678 | 4503599630810392 |
| 4503599630810394 | 4503599630810394 | 11821949021891678 | 4503599630810392 |
| 4503599630810396 | 4503599630773892 | 11821949021891678 | 4503599630810392 |
| 4503599630810398 | 4503599630773892 | 11821949021891678 | 4503599630810392 |
+------------------+------------------+-------------------+------------------+
How can I store a 2D array in python, like table in MySQL?
The first solution came to my mind is to use dict. The key is trip_id (the first column) and the value is list ([service_id, route_id, shape_id]).
Another solution is to use SQLite.
Which one is recommended, or other solutions?
PS: I want to store rows (say,[trip_id, service_id, route_id, shape_id]) that are crawled from webpages. It requires dozens of insert or append operation. The order of entries is not necessary, but should be unique.
[trip_id, service_id, route_id, shape_id]) that are crawled from webpages.