Tag: Pandas : Sort a DataFrame based on column names or row index labels using Dataframe.sort_index()
Pandas : Sort a DataFrame based on column names or row index labels using Dataframe.sort_index()
In this article we will discuss how to sort the contents of dataframe based on column names or row index labels using Dataframe.sort_index(). Dataframe.sort_index() In Python’s Pandas Library, Dataframe class provides a member function sort_index() to sort a DataFrame based on label names along the axis i.e. Advertisements DataFrame.sort_index(axis=0, level=None, ascending=True, inplace=False, kind=’quicksort’, na_position=’last’, sort_remaining=True, …