Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to load a CSV file into a pandas DataFrame.
ML Python
import pandas as pd data = pd.read_csv([1])
Drag options to blanks, or click blank then click option'
Attempts:
3 left
2fill in blank
mediumComplete the code to load the Iris dataset from sklearn.
ML Python
from sklearn import datasets iris = datasets.[1]()
Drag options to blanks, or click blank then click option'
Attempts:
3 left
3fill in blank
hardFix the error in the code to load a CSV file with pandas and display the first 5 rows.
ML Python
import pandas as pd df = pd.read_csv('data.csv') print(df.[1]())
Drag options to blanks, or click blank then click option'
Attempts:
3 left
4fill in blank
hardFill both blanks to load the digits dataset and get its data and target arrays.
ML Python
from sklearn import datasets digits = datasets.[1]() data = digits.[2]
Drag options to blanks, or click blank then click option'
Attempts:
3 left
5fill in blank
hardFill all three blanks to load the wine dataset, get its features and labels.
ML Python
from sklearn.datasets import [1] wine = [1]() features = wine.[2] labels = wine.[3]
Drag options to blanks, or click blank then click option'
Attempts:
3 left