Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Set column as index with pandas

import pandas as pd

# Set column as index
df = df.set_index("column")

# Display DataFrame
print(df)
Source by pythonexamples.org #
 
PREVIOUS NEXT
Tagged: #Set #column #index #pandas
ADD COMMENT
Topic
Name
5+5 =