Published
- 1 min read
rename multiple pandas columns with list
The solution for this is noted below
rename multiple pandas columns with list
Solution
for j in range(len(df.columns)):
old = df.columns[j]
new = new_columns[j]
df = df.rename(columns = {old:new})
Try other methods by searching on the site. That is if this doesn’t work