A

Admin • 802.91K Points
Coach

Q. Which of the following can be used to rename index labels?

  • (A) df.index.rename({'old':'new'})
  • (B) df.rename_index({'old':'new'})
  • (C) df.rename(index={'old':'new'})
  • (D) df.set_index({'old':'new'})
  • Correct Answer - Option(C)
  • Views: 1
  • Filed under category Pandas
  • Hashtags:

Explanation by: Admin
Use `df.rename(index={...})` to rename index labels.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.