-
- Notifications
You must be signed in to change notification settings - Fork 19.4k
Open
Labels
Description
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 this df = df.rename(columns=['j', 'k']) # equivalent to df.columns = ['j', 'k']jorisvandenbossche, Dr-Irv and tdpetrou