DataFrame.set_index()
pandas.DataFrame.set_index
-
DataFrame.set_index(keys, drop=True, append=False, inplace=False, verify_integrity=False)
-
Set the DataFrame index (row labels) using one or more existing columns. By default yields a new object.
Parameters: keys : column label or list of column labels / arrays
drop : boolean, default True
Delete columns to be used as the new index
append : boolean, default False
Whether to append columns to existing index
inplace : boolean, default False
Modify the DataFrame in place (do not create a new object)
v