%character for line magic and a double
%%prefix for cell magic, which operate on multiple lines of input.
ipython-sqlextension - into the notebook, run the following in the first code cell:
surveys, and we can display its entire contents by using a wildcard.
pop / 1000.0is evaluated for each row and appended to that row, in a new column.
jupyterlab-sqlis still a powerful extension that facilitates a SQL user interface to Jupyterlab, where we can:
jupyterlab-sql, run the following commands in the given order:
enterto connect. As soon as the database is connected, we can view all tables in the database. We can also write custom SQL queries to get the desired data from the tables.