We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 45d9c79 commit f97df66Copy full SHA for f97df66
pandas/core/reshape/encoding.py
@@ -1,6 +1,7 @@
1
from __future__ import annotations
2
3
from collections import defaultdict
4
+import inspect
5
import itertools
6
from typing import Hashable
7
import warnings
@@ -234,7 +235,7 @@ def _get_dummies_1d(
234
235
"In a future version of pandas the default dtype will change from "
236
"'uint8' to 'bool', please specify a dtype to silence this warning",
237
FutureWarning,
- stacklevel=find_stack_level(),
238
+ stacklevel=find_stack_level(inspect.currentframe()),
239
)
240
dtype = np.dtype(np.uint8)
241
# error: Argument 1 to "dtype" has incompatible type "Union[ExtensionDtype, str,
0 commit comments