This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.
📖 Task Introduction
In this task, you’ll replace the dependency on the local cleaning files with references to the cleaning library you created in the previous exercise.
🔨 Task Instructions
Return to the Files view in your left-hand panel and expand all contents.
Your .../preprocessed folder contains 3 code files, each of which imports the local cleaning utils on line 3. In each of the three preprocessed files, replace the "old" import statement with the "new" one:
Old: from myproject.datasets import type_utils as types, cleaning_utils as clean
New: from cleaning_functions import type_utils as types, cleaning_utils as clean
If your repository is underlining your new import statement in red, try opening your meta.yml file and clicking the Refresh Code Assist dependencies link in the top of the code editor window.
Right click on each of the *_utils.py files in your repository and choose Delete file. In the pop-up confirmation, click the red Yes, delete button.
Using the Preview button in the top right, confirm that your preprocessed transforms work with the new library reference (i.e., the category column values don'e appear with extra spaces, like delay••).
Commit your code with a message like, “refactor: replace local cleaning with shared lib.”
Once CI checks have passed on your commit, choose one of your preprocessed code files and build it on your branch to confirm it works with the new library reference.
Create a PR and merge your branch into Master if your build was successful.