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 accept Mapping[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 do df.rename(dict(mapping)) that feels redundant.
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.