Question discussion

Data frame in Pandas has a method which takes a column name (for a regular index) or a list of column names to create a new, re-indexed dat…

3517Medium DSSSB TGT Computer Science 0 replies

Data frame in Pandas has a method which takes a column name (for a regular index) or a list of column names to create a new, re-indexed data frame, which of the following is correct method?

  • AdFb
  • Bdata.index ( )
  • Cset_index ( )
  • DdFmi
Correct answer: C

Explanation

set_index() takes a column name or list of column names to create a re-indexed data frame.

Discussion 0

Nobody has replied yet. Start the discussion!