Connecting to databases
Connecting to databases can be very handy because you do not need to save the data to a file so that it can be loaded in memory. This might seem trivial if you are used to handling small files, but downloading big data datasets to files to be converted into specific formats can be a very tedious and boring task. This is where loading data directly from databases shines.
To create a connection to a database using Optimus, we can use any of the available methods for database handling. There are a few differences between this and remote filesystems, which we explained in the previous section:
from optimus import Optimus Op = optimus("dask") db = op.connect.postgres(address="localhost", user="root", password="12345678", ...