Set Index in pandas DataFrame - PYnative
https://pynative.com/pandas-set-index09.03.2021 · By default, DataFrame.set_index () function takes column name as input which should be used as an index of the DataFrame. After setting the new index, it deletes the column which is used. If we do not want to delete such a column from DataFrame, then we need to use the drop parameter of DataFrame.set_index (). It is a boolean flag such that,