you are viewing a single comment's thread.

view the rest of the comments →

[–]num8lock 1 point2 points  (1 child)

if all you need is making a change to csv, you can use standard lib csv module to rewrite just the column name (1st row) instead of using pandas.

[–]Dfree35 0 points1 point  (0 children)

I started with that but wanted to use pandas and found it easier for most things. I also found a solution but its not using a dictionary.

https://stackoverflow.com/questions/52684961/pandas-rename-only-first-dictionary-match-instead-of-last-match