From b21d3ab4dba8d6d194423ce373b97f507b5e3262 Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 16 Sep 2020 18:55:12 -0400 Subject: [PATCH 1/3] BUG: Typing in concat --- pandas/core/reshape/concat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index dd4bcf77641ef..5a1c2259049a9 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -69,7 +69,7 @@ def concat( def concat( - objs: Union[Iterable[FrameOrSeries], Mapping[Label, FrameOrSeries]], + objs: Union[Iterable[FrameOrSeriesUnion], Mapping[Label, FrameOrSeriesUnion]], axis=0, join="outer", ignore_index: bool = False, From 1bea1b1475523118f37af5870cf520c1ac0b220a Mon Sep 17 00:00:00 2001 From: Richard Date: Wed, 16 Sep 2020 18:59:43 -0400 Subject: [PATCH 2/3] Added typing to overload. --- pandas/core/reshape/concat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index 5a1c2259049a9..6c216dcdafa10 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -54,7 +54,7 @@ def concat( @overload def concat( - objs: Union[Iterable[FrameOrSeries], Mapping[Label, FrameOrSeries]], + objs: Union[Iterable[FrameOrSeriesUnion], Mapping[Label, FrameOrSeriesUnion]], axis=0, join: str = "outer", ignore_index: bool = False, From 2ab632846251c01373dbe5f2c51e2fc5a37a9a86 Mon Sep 17 00:00:00 2001 From: Richard Date: Thu, 17 Sep 2020 16:46:26 -0400 Subject: [PATCH 3/3] Changed to NDFrame --- pandas/core/reshape/concat.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandas/core/reshape/concat.py b/pandas/core/reshape/concat.py index 6c216dcdafa10..a07c7b49ac55b 100644 --- a/pandas/core/reshape/concat.py +++ b/pandas/core/reshape/concat.py @@ -31,6 +31,7 @@ if TYPE_CHECKING: from pandas import DataFrame + from pandas.core.generic import NDFrame # --------------------------------------------------------------------- # Concatenate DataFrame objects @@ -54,7 +55,7 @@ def concat( @overload def concat( - objs: Union[Iterable[FrameOrSeriesUnion], Mapping[Label, FrameOrSeriesUnion]], + objs: Union[Iterable["NDFrame"], Mapping[Label, "NDFrame"]], axis=0, join: str = "outer", ignore_index: bool = False, @@ -69,7 +70,7 @@ def concat( def concat( - objs: Union[Iterable[FrameOrSeriesUnion], Mapping[Label, FrameOrSeriesUnion]], + objs: Union[Iterable["NDFrame"], Mapping[Label, "NDFrame"]], axis=0, join="outer", ignore_index: bool = False,