File tree Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Expand file tree Collapse file tree 4 files changed +9
-0
lines changed Original file line number Diff line number Diff line change 41
41
ArrayLike ,
42
42
DateTimeErrorChoices ,
43
43
)
44
+ from pandas .util ._decorators import set_module
44
45
from pandas .util ._exceptions import find_stack_level
45
46
46
47
from pandas .core .dtypes .common import (
@@ -666,6 +667,7 @@ def to_datetime(
666
667
) -> DatetimeIndex : ...
667
668
668
669
670
+ @set_module ("pandas" )
669
671
def to_datetime (
670
672
arg : DatetimeScalarOrArrayConvertible | DictConvertible ,
671
673
errors : DateTimeErrorChoices = "raise" ,
Original file line number Diff line number Diff line change 15
15
Timedelta ,
16
16
Timestamp ,
17
17
)
18
+ from pandas .util ._decorators import set_module
18
19
from pandas .util ._validators import check_dtype_backend
19
20
20
21
from pandas .core .dtypes .cast import maybe_downcast_numeric
46
47
)
47
48
48
49
50
+ @set_module ("pandas" )
49
51
def to_numeric (
50
52
arg ,
51
53
errors : DateTimeErrorChoices = "raise" ,
Original file line number Diff line number Diff line change 22
22
disallow_ambiguous_unit ,
23
23
parse_timedelta_unit ,
24
24
)
25
+ from pandas .util ._decorators import set_module
25
26
26
27
from pandas .core .dtypes .common import is_list_like
27
28
from pandas .core .dtypes .dtypes import ArrowDtype
@@ -73,6 +74,7 @@ def to_timedelta(
73
74
) -> TimedeltaIndex : ...
74
75
75
76
77
+ @set_module ("pandas" )
76
78
def to_timedelta (
77
79
arg : str
78
80
| int
Original file line number Diff line number Diff line change @@ -453,6 +453,9 @@ def test_set_module():
453
453
assert pd .date_range .__module__ == "pandas"
454
454
assert pd .bdate_range .__module__ == "pandas"
455
455
assert pd .timedelta_range .__module__ == "pandas"
456
+ assert pd .to_datetime .__module__ == "pandas"
457
+ assert pd .to_timedelta .__module__ == "pandas"
458
+ assert pd .to_numeric .__module__ == "pandas"
456
459
assert pd .NamedAgg .__module__ == "pandas"
457
460
assert api .typing .SeriesGroupBy .__module__ == "pandas.api.typing"
458
461
assert api .typing .DataFrameGroupBy .__module__ == "pandas.api.typing"
You can’t perform that action at this time.
0 commit comments