WorksheetsData Mining - 04
Total questions: 6
Worksheet time: 6mins
In our last meeting, what are the key things you learned about Python, Pandas, or NumPy? Also, which parts did you find most difficult or confusing,
What is the purpose of the line import pandas as pd?
To rename the Python interpreter
To import the pandas library with an alias
To install pandas in the code
To import pandas and NumPy together
In the code, what does df = pd.DataFrame(data) do?
It deletes the dictionary named data
It converts data into a DataFrame object
It renames the dictionary data into df
It creates a NumPy array from data
What will the variable fruit_count store?
The number of unique categories in the DataFrame
The total number of rows in the DataFrame
The count of rows where the category is 'Fruit'
The price sum of all 'Fruit' items
Which of the following best represents the output of the code?
Number of rows with 'Fruit' category: 1
Number of rows with 'Fruit' category: 2
Number of rows with 'Fruit' category: 3
Number of rows with 'Fruit' category: 4
If we want to calculate the average Price of all items, which Pandas function is most appropriate?
df['Price'].mean()
df['Price'].sum()
df['Price'].count()
df['Price'].min()
