This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.
📖 Task Introduction
Global Code can be used to define variables and functions that will be available throughout transforms of language you define in your Workbook.
🔨 Task Instructions
Ensure that you're in the Python tab of your Global Code sidebar. If this tab does not have the following line of code in it, copy and paste it into this section:
from pyspark.sql import functions as F
Add the following code as on a new line of your Python Global Code:
import matplotlib.pyplot as plt
Click Preview on your current transformation, us_freight_flights, to confirm that your code was imported successfully.
If there are no errors when the transformation runs, that means that the library has been found and imported successfully. You can then click the » icon near the top-right corner of the Global Code sidebar to collapse it.