Generalize the type of the input to rename from dict to mapping #19400
Labels
enhancement
New feature or an improvement of an existing feature
good first issue
Good for newcomers
Description
Not really sure if this should be a feature request, but it seems the closest one to what I'm proposing.
Now the rename function accepts a
dict[str, str]
, is it feasible to generalize it to acceptMapping[str, str]
instead?In many places I tend to use mapping as it is readonly and avoids passing mutable structures around, but each time I have to invoke
df.rename
I have to dodf.rename(dict(mapping))
that feels redundant.The text was updated successfully, but these errors were encountered: