how to define a column as an index in python code example Example: define a column as index pandas myDataFrame.set_index('column_name')