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
29
32
def concat (
30
- objs ,
33
+ objs : Union [ Sequence [ "DataFrame" ], Mapping [ str , "DataFrame" ]] ,
31
34
axis = 0 ,
32
35
join : str = "outer" ,
33
36
ignore_index : bool = False ,
@@ -37,6 +40,33 @@ def concat(
37
40
verify_integrity : bool = False ,
38
41
sort : bool = False ,
39
42
copy : bool = True ,
43
+ ) -> "DataFrame" :
44
+ ...
45
+ @overload # noqa: E302
46
+ def concat (
47
+ objs : Union [Sequence [FrameOrSeriesUnion ], Mapping [str , FrameOrSeriesUnion ]],
48
+ axis = 0 ,
49
+ join : str = "outer" ,
50
+ ignore_index : bool = False ,
51
+ keys = None ,
52
+ levels = None ,
53
+ names = None ,
54
+ verify_integrity : bool = False ,
55
+ sort : bool = False ,
56
+ copy : bool = True ,
57
+ ) -> Union ["DataFrame" , "Series" ]:
58
+ ...
59
+ def concat ( # noqa: E302
60
+ objs : Union [Sequence [FrameOrSeriesUnion ], Mapping [str , FrameOrSeriesUnion ]],
61
+ axis = 0 ,
62
+ join = "outer" ,
63
+ ignore_index : bool = False ,
64
+ keys = None ,
65
+ levels = None ,
66
+ names = None ,
67
+ verify_integrity : bool = False ,
68
+ sort : bool = False ,
69
+ copy : bool = True ,
40
70
) -> Union ["DataFrame" , "Series" ]:
41
71
"""
42
72
Concatenate pandas objects along a particular axis with optional set logic
0 commit comments