Skip to content

Commit

Permalink
python overload vstack (#1997)
Browse files Browse the repository at this point in the history
  • Loading branch information
ritchie46 committed Dec 6, 2021
1 parent 807209e commit dacef40
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions py-polars/polars/internals/frame.py
Original file line number Diff line number Diff line change
Expand Up @@ -2493,6 +2493,18 @@ def hstack(
else:
return wrap_df(self._df.hstack([s.inner() for s in columns]))

@tp.overload
def vstack(self, df: "DataFrame", in_place: Literal[True]) -> None:
...

@tp.overload
def vstack(self, df: "DataFrame", in_place: Literal[False] = ...) -> "DataFrame":
...

@tp.overload
def vstack(self, df: "DataFrame", in_place: bool) -> Optional["DataFrame"]:
...

def vstack(self, df: "DataFrame", in_place: bool = False) -> Optional["DataFrame"]:
"""
Grow this DataFrame vertically by stacking a DataFrame to it.
Expand Down

0 comments on commit dacef40

Please sign in to comment.