Skip to content

Commit de723d2

Browse files
DOC: fix EX03 errors in docstrings - pandas.Timestamp - ceil, floor, round (#56879)
Co-authored-by: Marc Garcia <[email protected]>
1 parent 5c67c96 commit de723d2

File tree

3 files changed

+24
-27
lines changed

3 files changed

+24
-27
lines changed

ci/code_checks.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,6 @@ if [[ -z "$CHECK" || "$CHECK" == "docstrings" ]]; then
7979
pandas.errors.SettingWithCopyWarning \
8080
pandas.errors.SpecificationError \
8181
pandas.errors.UndefinedVariableError \
82-
pandas.Timestamp.ceil \
83-
pandas.Timestamp.floor \
84-
pandas.Timestamp.round \
8582
pandas.read_json \
8683
pandas.io.json.build_table_schema \
8784
pandas.io.formats.style.Styler.to_latex \

pandas/_libs/tslibs/nattype.pyx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -973,16 +973,16 @@ timedelta}, default 'raise'
973973
974974
A timestamp can be rounded using multiple frequency units:
975975
976-
>>> ts.round(freq='h') # hour
976+
>>> ts.round(freq='h') # hour
977977
Timestamp('2020-03-14 16:00:00')
978978
979-
>>> ts.round(freq='min') # minute
979+
>>> ts.round(freq='min') # minute
980980
Timestamp('2020-03-14 15:33:00')
981981
982-
>>> ts.round(freq='s') # seconds
982+
>>> ts.round(freq='s') # seconds
983983
Timestamp('2020-03-14 15:32:52')
984984
985-
>>> ts.round(freq='ms') # milliseconds
985+
>>> ts.round(freq='ms') # milliseconds
986986
Timestamp('2020-03-14 15:32:52.193000')
987987
988988
``freq`` can also be a multiple of a single unit, like '5min' (i.e. 5 minutes):
@@ -1062,16 +1062,16 @@ timedelta}, default 'raise'
10621062
10631063
A timestamp can be floored using multiple frequency units:
10641064
1065-
>>> ts.floor(freq='h') # hour
1065+
>>> ts.floor(freq='h') # hour
10661066
Timestamp('2020-03-14 15:00:00')
10671067
1068-
>>> ts.floor(freq='min') # minute
1068+
>>> ts.floor(freq='min') # minute
10691069
Timestamp('2020-03-14 15:32:00')
10701070
1071-
>>> ts.floor(freq='s') # seconds
1071+
>>> ts.floor(freq='s') # seconds
10721072
Timestamp('2020-03-14 15:32:52')
10731073
1074-
>>> ts.floor(freq='ns') # nanoseconds
1074+
>>> ts.floor(freq='ns') # nanoseconds
10751075
Timestamp('2020-03-14 15:32:52.192548651')
10761076
10771077
``freq`` can also be a multiple of a single unit, like '5min' (i.e. 5 minutes):
@@ -1151,16 +1151,16 @@ timedelta}, default 'raise'
11511151
11521152
A timestamp can be ceiled using multiple frequency units:
11531153
1154-
>>> ts.ceil(freq='h') # hour
1154+
>>> ts.ceil(freq='h') # hour
11551155
Timestamp('2020-03-14 16:00:00')
11561156
1157-
>>> ts.ceil(freq='min') # minute
1157+
>>> ts.ceil(freq='min') # minute
11581158
Timestamp('2020-03-14 15:33:00')
11591159
1160-
>>> ts.ceil(freq='s') # seconds
1160+
>>> ts.ceil(freq='s') # seconds
11611161
Timestamp('2020-03-14 15:32:53')
11621162
1163-
>>> ts.ceil(freq='us') # microseconds
1163+
>>> ts.ceil(freq='us') # microseconds
11641164
Timestamp('2020-03-14 15:32:52.192549')
11651165
11661166
``freq`` can also be a multiple of a single unit, like '5min' (i.e. 5 minutes):

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1973,16 +1973,16 @@ timedelta}, default 'raise'
19731973
19741974
A timestamp can be rounded using multiple frequency units:
19751975
1976-
>>> ts.round(freq='h') # hour
1976+
>>> ts.round(freq='h') # hour
19771977
Timestamp('2020-03-14 16:00:00')
19781978
1979-
>>> ts.round(freq='min') # minute
1979+
>>> ts.round(freq='min') # minute
19801980
Timestamp('2020-03-14 15:33:00')
19811981
1982-
>>> ts.round(freq='s') # seconds
1982+
>>> ts.round(freq='s') # seconds
19831983
Timestamp('2020-03-14 15:32:52')
19841984
1985-
>>> ts.round(freq='ms') # milliseconds
1985+
>>> ts.round(freq='ms') # milliseconds
19861986
Timestamp('2020-03-14 15:32:52.193000')
19871987
19881988
``freq`` can also be a multiple of a single unit, like '5min' (i.e. 5 minutes):
@@ -2064,16 +2064,16 @@ timedelta}, default 'raise'
20642064
20652065
A timestamp can be floored using multiple frequency units:
20662066
2067-
>>> ts.floor(freq='h') # hour
2067+
>>> ts.floor(freq='h') # hour
20682068
Timestamp('2020-03-14 15:00:00')
20692069
2070-
>>> ts.floor(freq='min') # minute
2070+
>>> ts.floor(freq='min') # minute
20712071
Timestamp('2020-03-14 15:32:00')
20722072
2073-
>>> ts.floor(freq='s') # seconds
2073+
>>> ts.floor(freq='s') # seconds
20742074
Timestamp('2020-03-14 15:32:52')
20752075
2076-
>>> ts.floor(freq='ns') # nanoseconds
2076+
>>> ts.floor(freq='ns') # nanoseconds
20772077
Timestamp('2020-03-14 15:32:52.192548651')
20782078
20792079
``freq`` can also be a multiple of a single unit, like '5min' (i.e. 5 minutes):
@@ -2153,16 +2153,16 @@ timedelta}, default 'raise'
21532153
21542154
A timestamp can be ceiled using multiple frequency units:
21552155
2156-
>>> ts.ceil(freq='h') # hour
2156+
>>> ts.ceil(freq='h') # hour
21572157
Timestamp('2020-03-14 16:00:00')
21582158
2159-
>>> ts.ceil(freq='min') # minute
2159+
>>> ts.ceil(freq='min') # minute
21602160
Timestamp('2020-03-14 15:33:00')
21612161
2162-
>>> ts.ceil(freq='s') # seconds
2162+
>>> ts.ceil(freq='s') # seconds
21632163
Timestamp('2020-03-14 15:32:53')
21642164
2165-
>>> ts.ceil(freq='us') # microseconds
2165+
>>> ts.ceil(freq='us') # microseconds
21662166
Timestamp('2020-03-14 15:32:52.192549')
21672167
21682168
``freq`` can also be a multiple of a single unit, like '5min' (i.e. 5 minutes):

0 commit comments

Comments
 (0)