Q. Which method is used to drop a level from a MultiIndex in pandas?

  • (A) unstack()
  • (B) stack()
  • (C) droplevel()
  • (D) remove_level()
πŸ’¬ Discuss
βœ… Correct Answer: (C) droplevel()
Explanation: The droplevel() method removes a specified level from a MultiIndex.
Explanation by: Sikhar Chaudhary
The droplevel() method removes a specified level from a MultiIndex.

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
81
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Sikhar Chaudhary
Publisher
πŸ“ˆ
94%
Success Rate