how to index dataframe pandas code example Example: df.index The index (row labels) of the DataFrame.