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
Add a keyword argument `mapping` to `pandas.util.deprecate_kwarg` to allow
remapping deprecated keyword arguments. For example, in #7963, which inspired
this PR, one could write this:
```python
@deprecate_kwarg(old_arg_name='infer_dst', new_arg_name='ambiguous',
mapping={True: 'infer', False: 'raise'})
def tz_localize(self, tz, ambiguous=None):
...
```
Tests of this functionality are added to `pandas/tests/test_util.py`, created
for this purpose; the `if __name__ == '__main__'` section is cribbed directly
from `test_index.py`.
0 commit comments