What method would you use to change the index of a DataFrame?

Instruction: Explain the process and purpose of reindexing a DataFrame in Pandas.

Context: This question assesses the candidate's understanding of the reindexing process in Pandas and its application in data manipulation.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

reindex conforms rows or columns to a requested label sequence. It can reorder, omit or add labels; it does not simply rename existing labels...

Related Questions