Question 23
Consider a dataset representing various attributes of red wine, loaded into a Pandas DataFrame named data using the following code:
Suppose we are interested in extracting the value of the chlorides attribute for the third sample in the dataset (2nd by index). Which of the following expressions correctly achieves this? chlorides is at the 4th index of columns.
data.chlorides[2]
data[’chlorides’][2]
data[2][4]
data.iloc[2, 4]