Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

change index of dataframe with list

#Python 3
#Declare list of index
#and just assign it to the existing dataframe

separate_list = [1,2,3,4,5]
df.index = separate_list
 
PREVIOUS NEXT
Tagged: #change #index #dataframe #list
ADD COMMENT
Topic
Name
3+3 =