xxxxxxxxxx
df = pd.read_csv('data.csv',index_col=0)
df.index = [str(x) for x in df.index]
xxxxxxxxxx
import pandas as pd
# File path of the CSV file
csv_file = "path/to/your/file.csv"
# Name of the column to set as the index
index_column = "column_name"
# Read the CSV file and set the desired column as the index
df = pd.read_csv(csv_file, index_col=index_column)
# Print the resulting DataFrame
print(df)