You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is closely related to #12392, but I think separate issue. Proposal would be to be able to pass a list-like to DataFrame.rename to make method-chaining easier. I think it would also be consistent with #11980 (Series rename)
df=pd.DataFrame({'a': [1,2], 'b': [3, 4]})
# make thisdf=df.rename(columns=['j', 'k'])
# equivalent to df.columns= ['j', 'k']