You have to develop a script that reads a CSV file and processes the data row by row. Which Python module would you use to read the CSV file?
- csv
- json
- os
- pandas
To read and process CSV files in Python, you would typically use the csv module. It provides functions like csv.reader() to easily read and parse CSV data row by row. Options os and json are not designed for CSV handling, and while pandas can handle CSVs, it is not a built-in Python module.
Loading...
Related Quiz
- You have a dataset with a large number of features. How would you use Scikit-learn to select the most important features for model training?
- In Scikit-learn, ____ is the method used to train a model using the training data.
- In Python, _____ is a special method used to overload the ‘+’ operator for custom objects.
- A ____ tree is a tree in which each node has at most two children, which are referred to as the left child and the right child.
- Python's ____ allows classes to be created dynamically, at runtime.