Direction: Choose the correct option
Q1.
How do you group a DataFrame by a column?
Direction: Choose the correct option
Q2.
After grouping, how do you get the mean of each group?
Direction: Choose the correct option
Q3.
What is the output of `df.groupby('dept')['salary'].agg(['mean','max'])`?
Direction: Choose the correct option
Q4.
How do you group by multiple columns?
Direction: Choose the correct option
Q5.
What does `df.groupby('col')['value'].transform('mean')` do?
Direction: Choose the correct option
Q6.
How do you get the number of elements in each group?
Direction: Choose the correct option
Q7.
What is the purpose of `pd.cut()`?
Direction: Choose the correct option
Q8.
How do you apply multiple aggregation functions to different columns?
Direction: Choose the correct option
Q9.
What does `df.groupby('col').filter(lambda x: x['value'].sum() > 10)` do?
Direction: Choose the correct option
Q10.
What is the difference between `transform` and `apply` in groupby?
