Skip to content

Commit 763d02d

Browse files
Backport PR #43834: TYP: Fix typing of frame.explode (#43841)
Co-authored-by: Patrick Hoefler <[email protected]>
1 parent 968b48b commit 763d02d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pandas/core/frame.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8137,7 +8137,7 @@ def stack(self, level: Level = -1, dropna: bool = True):
81378137

81388138
def explode(
81398139
self,
8140-
column: Scalar | tuple | list[Scalar | tuple],
8140+
column: IndexLabel,
81418141
ignore_index: bool = False,
81428142
) -> DataFrame:
81438143
"""
@@ -8147,7 +8147,7 @@ def explode(
81478147
81488148
Parameters
81498149
----------
8150-
column : Scalar or tuple or list thereof
8150+
column : IndexLabel
81518151
Column(s) to explode.
81528152
For multiple columns, specify a non-empty list with each element
81538153
be str or tuple, and all specified columns their list-like data
@@ -8229,7 +8229,7 @@ def explode(
82298229
if not self.columns.is_unique:
82308230
raise ValueError("columns must be unique")
82318231

8232-
columns: list[Scalar | tuple]
8232+
columns: list[Hashable]
82338233
if is_scalar(column) or isinstance(column, tuple):
82348234
columns = [column]
82358235
elif isinstance(column, list) and all(

0 commit comments

Comments
 (0)