Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

rename multiple pandas columns with list

for j in range(len(df.columns)):
    old = df.columns[j]
    new = new_columns[j]
    df = df.rename(columns = {old:new})
 
PREVIOUS NEXT
Tagged: #rename #multiple #pandas #columns #list
ADD COMMENT
Topic
Name
7+9 =