2
2
concat routines
3
3
"""
4
4
5
- from typing import Hashable , List , Optional
5
+ from typing import Hashable , List , Mapping , Optional , Sequence , Union , overload
6
6
7
7
import numpy as np
8
8
9
+ from pandas ._typing import FrameOrSeriesUnion
10
+
9
11
from pandas import DataFrame , Index , MultiIndex , Series
10
12
from pandas .core .arrays .categorical import (
11
13
factorize_from_iterable ,
26
28
# Concatenate DataFrame objects
27
29
28
30
31
+ @overload
32
+ def concat (
33
+ objs : Union [Sequence ["DataFrame" ], Mapping [Optional [Hashable ], "DataFrame" ]],
34
+ axis = 0 ,
35
+ join : str = "outer" ,
36
+ ignore_index : bool = False ,
37
+ keys = None ,
38
+ levels = None ,
39
+ names = None ,
40
+ verify_integrity : bool = False ,
41
+ sort : bool = False ,
42
+ copy : bool = True ,
43
+ ) -> "DataFrame" :
44
+ ...
45
+
46
+
47
+ @overload
29
48
def concat (
30
- objs ,
49
+ objs : Union [
50
+ Sequence [FrameOrSeriesUnion ], Mapping [Optional [Hashable ], FrameOrSeriesUnion ]
51
+ ],
31
52
axis = 0 ,
32
53
join : str = "outer" ,
33
54
ignore_index : bool = False ,
@@ -37,7 +58,24 @@ def concat(
37
58
verify_integrity : bool = False ,
38
59
sort : bool = False ,
39
60
copy : bool = True ,
40
- ):
61
+ ) -> FrameOrSeriesUnion :
62
+ ...
63
+
64
+
65
+ def concat (
66
+ objs : Union [
67
+ Sequence [FrameOrSeriesUnion ], Mapping [Optional [Hashable ], FrameOrSeriesUnion ]
68
+ ],
69
+ axis = 0 ,
70
+ join = "outer" ,
71
+ ignore_index : bool = False ,
72
+ keys = None ,
73
+ levels = None ,
74
+ names = None ,
75
+ verify_integrity : bool = False ,
76
+ sort : bool = False ,
77
+ copy : bool = True ,
78
+ ) -> FrameOrSeriesUnion :
41
79
"""
42
80
Concatenate pandas objects along a particular axis with optional set logic
43
81
along the other axes.
0 commit comments