Ms. Bhavika wants to change the index of the dataframe and the output for the same is given below:

  Name  Stream
student 1  ananya  humanities
student 2  bhavya  humanities


Identify the correct statement to change the index.

1
d1.index[*student1', 'student2']
2
d1.index = ['student1', 'student2']
3
d1.index[ ] = ['student1', 'student2']
4
d1.index() = ['student1', 'student2']

Sponsored

hivanix.in

Visit

This quiz is brought to you by hivanix.in

🌐 Web App Development

Quick Navigation