2
2
concat routines
3
3
"""
4
4
5
- from typing import List , Union
5
+ from typing import List , Mapping , Sequence , Union , overload
6
6
7
7
import numpy as np
8
8
25
25
# ---------------------------------------------------------------------
26
26
# Concatenate DataFrame objects
27
27
28
+ FrameOrSeriesUnion = Union ["DataFrame" , "Series" ]
28
29
30
+
31
+ @overload
32
+ def concat (
33
+ objs : Union [Sequence ["DataFrame" ], Mapping [str , "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 [ Sequence [ FrameOrSeriesUnion ], Mapping [ str , FrameOrSeriesUnion ]] ,
31
50
axis = 0 ,
32
51
join : str = "outer" ,
33
52
ignore_index : bool = False ,
@@ -37,6 +56,21 @@ def concat(
37
56
verify_integrity : bool = False ,
38
57
sort : bool = False ,
39
58
copy : bool = True ,
59
+ ) -> Union ["DataFrame" , "Series" ]:
60
+ ...
61
+
62
+
63
+ def concat (
64
+ objs : Union [Sequence [FrameOrSeriesUnion ], Mapping [str , FrameOrSeriesUnion ]],
65
+ axis = 0 ,
66
+ join = "outer" ,
67
+ ignore_index : bool = False ,
68
+ keys = None ,
69
+ levels = None ,
70
+ names = None ,
71
+ verify_integrity : bool = False ,
72
+ sort : bool = False ,
73
+ copy : bool = True ,
40
74
) -> Union ["DataFrame" , "Series" ]:
41
75
"""
42
76
Concatenate pandas objects along a particular axis with optional set logic
0 commit comments