Skip to content

Commit 8043788

Browse files
author
MomIsBestFriend
committed
Added full docstring
1 parent 4a8d0a2 commit 8043788

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

pandas/_libs/tslibs/nattype.pyx

+22
Original file line numberDiff line numberDiff line change
@@ -473,6 +473,28 @@ class NaTType(_NaT):
473473
474474
Return a new Timestamp corresponding to the
475475
ISO calendar date specified by year, week and day.
476+
477+
Parameters
478+
----------
479+
year: int
480+
Representing a year.
481+
week : int
482+
Value between 1-53, representing a week in a year.
483+
day : int
484+
Value between 1-7, representing a day in the week.
485+
486+
Returns
487+
-------
488+
Timestamp
489+
490+
Raises
491+
------
492+
NotImplementedError
493+
If the running platform is a Python version earlier than 3.8
494+
495+
Notes
496+
-----
497+
`week` can have the value of 53, only when year is a leap year.
476498
"""
477499
)
478500
timestamp = _make_error_func('timestamp', # noqa:E128

pandas/_libs/tslibs/timestamps.pyx

+22
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,28 @@ class Timestamp(_Timestamp):
343343
344344
Return a new Timestamp corresponding to the
345345
ISO calendar date specified by year, week and day.
346+
347+
Parameters
348+
----------
349+
year: int
350+
Representing a year.
351+
week : int
352+
Value between 1-53, representing a week in a year.
353+
day : int
354+
Value between 1-7, representing a day in the week.
355+
356+
Returns
357+
-------
358+
Timestamp
359+
360+
Raises
361+
------
362+
NotImplementedError
363+
If the running platform is a Python version earlier than 3.8
364+
365+
Notes
366+
-----
367+
`week` can have the value of 53, only when year is a leap year.
346368
"""
347369
import pandas.compat as compat
348370

0 commit comments

Comments
 (0)