I'm trying to load a database into iPython so that I can run loops over the data with Python. So far I have the below query that will load the data, which can be printed to iPython:
> sql = %sql SELECT * FROM products
> print sql
+----+--------------+---------------+-------+
| id | Product | Make | Price |
+----+--------------+---------------+-------+
| 0 | Product1 | Make1 | 5 |
| 1 | Product2 | Make2 | 1 |
| 2 | Product3 | Make2 | 8 |
However I'm having trouble imputing these results into Python. Is there a good way to store data like this into python variables so that I can run loops over the data?
Thanks in advance!