Skip to content

Commit 4529b51

Browse files
GH1065 timestamp freq argument and DataFrame/Series.mask (#1066)
* GH1065 Timestamp freq argument removal * GH1065 Add details to type of other in mask * GH1065 Revert json * GH1065 Realign Timestamp args with pandas
1 parent d4d399e commit 4529b51

File tree

2 files changed

+4
-9
lines changed

2 files changed

+4
-9
lines changed

pandas-stubs/_libs/tslibs/timestamps.pyi

+3-8
Original file line numberDiff line numberDiff line change
@@ -59,21 +59,18 @@ class Timestamp(datetime):
5959
def __new__(
6060
cls,
6161
ts_input: np.integer | float | str | _date | datetime | np.datetime64 = ...,
62-
# Freq is deprecated but is left in to allow code like Timestamp(2000,1,1)
63-
# Removing it would make the other arguments position only
64-
freq: int | str | BaseOffset | None = ...,
65-
tz: str | _tzinfo | int | None = ...,
66-
unit: str | int | None = ...,
6762
year: int | None = ...,
6863
month: int | None = ...,
6964
day: int | None = ...,
7065
hour: int | None = ...,
7166
minute: int | None = ...,
7267
second: int | None = ...,
7368
microsecond: int | None = ...,
74-
nanosecond: int | None = ...,
7569
tzinfo: _tzinfo | None = ...,
7670
*,
71+
nanosecond: int | None = ...,
72+
tz: str | _tzinfo | int | None = ...,
73+
unit: str | int | None = ...,
7774
fold: Literal[0, 1] | None = ...,
7875
) -> Self: ...
7976
# GH 46171
@@ -119,8 +116,6 @@ class Timestamp(datetime):
119116
def fromordinal(
120117
cls,
121118
ordinal: int,
122-
# freq produces a FutureWarning about being deprecated in a future version
123-
freq: None = ...,
124119
tz: _tzinfo | str | None = ...,
125120
) -> Self: ...
126121
@classmethod

pandas-stubs/core/frame.pyi

+1-1
Original file line numberDiff line numberDiff line change
@@ -1955,7 +1955,7 @@ class DataFrame(NDFrame, OpsMixin):
19551955
| Callable[[DataFrame], DataFrame]
19561956
| Callable[[Any], _bool]
19571957
),
1958-
other=...,
1958+
other: Scalar | Series[S1] | DataFrame | Callable | NAType | None = ...,
19591959
*,
19601960
inplace: _bool = ...,
19611961
axis: Axis | None = ...,

0 commit comments

Comments
 (0)