diff --git a/pandas/util/depr_module.py b/pandas/util/depr_module.py index b438c91d980af..9c648b76fdad1 100644 --- a/pandas/util/depr_module.py +++ b/pandas/util/depr_module.py @@ -83,8 +83,7 @@ def __getattr__(self, name): FutureWarning, stacklevel=2) else: if deprmodto is None: - deprmodto = "{modname}.{name}".format( - modname=obj.__module__, name=name) + deprmodto = obj.__module__ # The object is actually located in another module. warnings.warn( "{deprmod}.{name} is deprecated. Please use "