Skip to content

Commit

Permalink
TYP: Fix typing of frame.explode (pandas-dev#43834)
Browse files Browse the repository at this point in the history
  • Loading branch information
phofl authored and gasparitiago committed Oct 9, 2021
1 parent 059382a commit df11f82
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pandas/core/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -8201,7 +8201,7 @@ def stack(self, level: Level = -1, dropna: bool = True):

def explode(
self,
column: Scalar | tuple | list[Scalar | tuple],
column: IndexLabel,
ignore_index: bool = False,
) -> DataFrame:
"""
Expand All @@ -8211,7 +8211,7 @@ def explode(
Parameters
----------
column : Scalar or tuple or list thereof
column : IndexLabel
Column(s) to explode.
For multiple columns, specify a non-empty list with each element
be str or tuple, and all specified columns their list-like data
Expand Down Expand Up @@ -8293,7 +8293,7 @@ def explode(
if not self.columns.is_unique:
raise ValueError("columns must be unique")

columns: list[Scalar | tuple]
columns: list[Hashable]
if is_scalar(column) or isinstance(column, tuple):
columns = [column]
elif isinstance(column, list) and all(
Expand Down

0 comments on commit df11f82

Please sign in to comment.