1.

Which of the following method can be used to rename categorical data?(a) Categorical.rename_categories()(b) Categorical.rename()(c) Categorical.mv_categories()(d) None of the mentionedI had been asked this question in a job interview.My question is based upon Time Deltas in section Data Analysis with Python of Data Science

Answer»

Correct CHOICE is (a) Categorical.rename_categories()

BEST explanation: Renaming categories is DONE by assigning NEW values to the Series.cat.categories property.



Discussion

No Comment Found

Related InterviewSolutions