Question

In pandas, what does df.groupby('A').agg({'B': 'sum', 'C': 'mean'}) return?

A A DataFrame with aggregated columns B and C by groups of A.
B A Series indexed by A with tuple values.
C Raises an error due to mixed aggregations.
D A list of DataFrames.
E A pivot table that loses grouping index.
Practice Next

Hey! Ask a query

🎓
Think You're Ready for RBI Grade B?
RBI Grade B 2026 Phase 1 Memory Based Paper
  • 200 Questions with Detailed Solutions
  • Section-wise Coverage (GA, English, Quant & Reasoning)