CompTIA DataX DY0-001 (V1) Practice Question

While preparing a production-ready Python package, a data-science team is refactoring a 300-line Jupyter notebook that performs feature engineering and model training. The notebook is full of hard-coded file paths and hyperparameters, and changing them between experiments routinely breaks unit tests. From a clean code perspective, which single refactoring step will most directly improve both readability and testability of the new codebase?

  • Move all file paths and hyperparameters into a YAML configuration file that is loaded at start-up and injected into the pipeline functions.

  • Define the file paths and hyperparameters as module-level global variables so they can be accessed without passing extra arguments.

  • Delete all function docstrings and rely on inline comments to keep individual functions as short as possible.

  • Rewrite the entire feature-engineering logic as a single nested list comprehension to minimize the number of functions.

CompTIA DataX DY0-001 (V1)
Operations and Processes
Your Score:
Settings & Objectives
Random Mixed
Questions are selected randomly from all chosen topics, with a preference for those you haven’t seen before. You may see several questions from the same objective or domain in a row.
Rotate by Objective
Questions cycle through each objective or domain in turn, helping you avoid long streaks of questions from the same area. You may see some repeat questions, but the distribution will be more balanced across topics.

Check or uncheck an objective to set which questions you will receive.

SAVE $64
$529.00 $465.00
Bash, the Crucial Exams Chat Bot
AI Bot