S

Shyam Dubey • 3.70K Points
Extraordinary

Q. Which pandas method is used to change column names in-place?

  • (A) columns()
  • (B) rename(columns=..., inplace=True)
  • (C) set_columns()
  • (D) update_columns()
  • Correct Answer - Option(B)
  • Views: 20
  • Filed under category Pandas
  • Hashtags:

Explanation by: Shyam Dubey

By using rename() with the inplace=True argument, the column names can be modified directly in the existing DataFrame.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.