Import the required modules and assign the API key to a variable. These commands should be added into Jupyter Notebook cells:
import geopandas as gpd
import pandas as pd
import os
from mapboxgl.utils import *
from mapboxgl.viz import *
token = '{user API Key}'
The API key can also be assigned to a Windows path environment variable (for example, "MAPBOX_ACCESS_TOKEN") and called using the os module:
token = os.getenv("MAPBOX_ACCESS_TOKEN")