Skip to content

Conversation

@abonte
Copy link
Contributor

@abonte abonte commented Jan 7, 2023

Added Returns and See Also sections for the following properties of the Timestamp class:

is_month_start

output scripts/validate_docstrings.py
################################################################################ ################# Docstring (pandas.Timestamp.is_month_start) ################# ################################################################################ Return True if the date is the first day of the month. Returns ------- bool True if the date is the first day of the month. See Also -------- Timestamp.is_month_end : Similar property indicating the last day of the month. Examples -------- >>> ts = pd.Timestamp(2020, 3, 14) >>> ts.is_month_start False >>> ts = pd.Timestamp(2020, 1, 1) >>> ts.is_month_start True ################################################################################ ################################## Validation ################################## ################################################################################ 1 Errors found: No extended summary found 

is_month_end

output scripts/validate_docstrings.py
################################################################################ ################## Docstring (pandas.Timestamp.is_month_end) ################## ################################################################################ Return True if the date is the last day of the month. Returns ------- bool True if the date is the last day of the month. See Also -------- Timestamp.is_month_start : Similar property indicating month start. Examples -------- >>> ts = pd.Timestamp(2020, 3, 14) >>> ts.is_month_end False >>> ts = pd.Timestamp(2020, 12, 31) >>> ts.is_month_end True ################################################################################ ################################## Validation ################################## ################################################################################ 1 Errors found: No extended summary found 

is_quarter_start

output scripts/validate_docstrings.py
################################################################################ ################ Docstring (pandas.Timestamp.is_quarter_start) ################ ################################################################################ Return True if the date is the first day of the quarter. Returns ------- bool True if date is first day of the quarter. See Also -------- Timestamp.is_quarter_end : Similar property indicating the quarter end. Timestamp.quarter : Return the quarter of the date. Examples -------- >>> ts = pd.Timestamp(2020, 3, 14) >>> ts.is_quarter_start False >>> ts = pd.Timestamp(2020, 4, 1) >>> ts.is_quarter_start True ################################################################################ ################################## Validation ################################## ################################################################################ 1 Errors found: No extended summary found 

is_quarter_end

output scripts/validate_docstrings.py
################################################################################ ################# Docstring (pandas.Timestamp.is_quarter_end) ################# ################################################################################ Return True if the date is last day of the quarter. Returns ------- bool True if date is last day of the quarter. See Also -------- Timestamp.is_quarter_start : Similar property indicating the quarter start. Timestamp.quarter : Return the quarter of the date. Examples -------- >>> ts = pd.Timestamp(2020, 3, 14) >>> ts.is_quarter_end False >>> ts = pd.Timestamp(2020, 3, 31) >>> ts.is_quarter_end True ################################################################################ ################################## Validation ################################## ################################################################################ 1 Errors found: No extended summary found 
@abonte abonte changed the title DOC: update docstrings of Timestamp properties DOC: improve Timestamp properties docstrings Jan 7, 2023
@gfyoung gfyoung added Docs Timestamp pd.Timestamp and associated methods labels Jan 8, 2023
@phofl phofl added this to the 2.0 milestone Jan 8, 2023
@phofl phofl merged commit 296cbda into pandas-dev:main Jan 8, 2023
@phofl
Copy link
Member

phofl commented Jan 8, 2023

thx @abonte

@abonte abonte deleted the update-timestamp-docstrings branch January 8, 2023 21:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Docs Timestamp pd.Timestamp and associated methods

3 participants