BrandonFors/pandas-github-issues huggingface dataset:
DOC: update the Period.days_in_month docstring
State: closed

- [x] PR title is "DOC: update the <your-function-or-method> docstring"
- [x] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [x] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [ ] It has been proofread on language by another sprint participant

```
################################################################################
################### Docstring (pandas.Period.days_in_month)  ###################
################################################################################

Get the total number of days in the month that this period falls on.

Returns
-------
int

See Also
--------
Period.daysinmonth : Returns the number of days in the month.
DatetimeIndex.daysinmonth : Return the number of days in the month.
calendar.monthrange : Return a tuple containing weekday
    (0-6 ~ Mon-Sun) and number of days (28-31).

Examples
--------
>>> p= pd.Period('2018-2-17')
>>> p.days_in_month
28

>>> import datetime
>>> pd.Period(datetime.datetime.today(), freq= 'B').days_in_month
31

Handles the leap year case as well:

>>> p= pd.Period('2016-2-17')
>>> p.days_in_month
29

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
	No extended summary found
```

* Short summary summarises pretty much all the characteristics of this attribute.


Labels:
name: Docs
name: Datetime
description: Datetime data dtype

Comments:
@HimanshuAwasthi95 @TomAugspurger, Made the suggested changes. Please Review.
@Tushar987 Did you push your changes with the PEP8 fixes (the spaces before the `=`, so `p = ...`)? 
Oh, also the `datetime.today` change. I'm guessing you just need to push :)
@TomAugspurger, Sorry! forgot to push changes. Please review.

Looks good, thanks!
Hmm, I also recently merged PR for `daysinmonth`: https://github.com/pandas-dev/pandas/pull/20295 
Probably we should try to consolidate both (and let them have a shared docstring)
TST: adding join_types fixture
State: closed

follow up for PR #20059

Extracting join types to a fixture

- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`


Labels:
name: Testing
description: pandas testing functions or related to the test suite

Comments:
Hello @almaleksia! Thanks for updating the PR.

































Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on March 12, 2018 at 23:23 Hours UTC
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20287?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@31afaf8`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/pandas-dev/pandas/pull/20287/graphs/tree.svg?height=150&width=650&token=eZ4WkYLtcO&src=pr)](https://codecov.io/gh/pandas-dev/pandas/pull/20287?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master   #20287   +/-   ##
=========================================
  Coverage          ?   91.73%           
=========================================
  Files             ?      150           
  Lines             ?    49168           
  Branches          ?        0           
=========================================
  Hits              ?    45102           
  Misses            ?     4066           
  Partials          ?        0
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.11% <ø> (?)` | |
| #single | `41.86% <ø> (?)` | |


------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20287?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/20287?src=pr&el=footer). Last update [31afaf8...9dabfc1](https://codecov.io/gh/pandas-dev/pandas/pull/20287?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

thanks @almaleksia keep em coming!

if you are looking for things........want to make tz a top-level fixture (prob need to name it something different though as the name tz is pretty common), e.g.

https://github.com/pandas-dev/pandas/blob/master/pandas/tests/indexes/datetimes/test_timezones.py#L244 (and many other very similar lines of code).

@jreback sure, thank you for the feedback. I'll make PR. I also wanted to take splitting pandas/tests/frame/test_indexing.py  :D
DOC/TST: Added NORMALIZE_WHITESPACE flag
State: closed

I think we want this to be always on. You can disable it with

```
doctest: -NORMALIZE_WHITESPACE
```

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Docs

Comments:
In the validation script we also set `IGNORE_EXCEPTION_DETAIL`, and have this in https://github.com/pandas-dev/pandas/pull/19952 as well (but give that's still some time before that will be merged, fine to add it already in this PR)
Added `IGNORE_EXCEPTION_DETAIL` so we're consistent.
DOC: update the pandas.Series.dt.is_quarter_end docstring
State: closed

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [X] PR title is "DOC: update the <your-function-or-method> docstring"
- [X] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [X] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [X] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
################################################################################
################# Docstring (pandas.Series.dt.is_quarter_end)  #################
################################################################################

Return a boolean indicating whether the date is the last day of a
quarter.

Returns
-------
is_quarter_end : Series of boolean.

See Also
--------
quarter : Return the quarter of the date.

is_quarter_start : Return a boolean indicating whether the date is the
    first day of the quarter.

Examples
--------
>>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30",
...                   periods=4)})
>>> df.assign(quarter = df.dates.dt.quarter,
...          is_quarter_end = df.dates.dt.is_quarter_end)
       dates  quarter    is_quarter_end
0 2017-03-30        1             False
1 2017-03-31        1              True
2 2017-04-01        2             False
3 2017-04-02        2             False

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
	No summary found (a short summary in a single line should be present at the beginning of the docstring)

```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.

* No extended summary required.
* Short summary exceeds one line by one word, hope that is ok


Labels:
name: Docs
name: Datetime
description: Datetime data dtype

Comments:
Thanks @janelle!
DOC: update the pandas.Series.dt.is_quarter_start docstring
State: closed

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [X] PR title is "DOC: update the <your-function-or-method> docstring"
- [X] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [X] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [X] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
################################################################################
################ Docstring (pandas.Series.dt.is_quarter_start)  ################
################################################################################

Return a boolean indicating whether the date is the first day of a
quarter.

Returns
-------
is_quarter_start : Series of boolean.

See Also
--------
quarter : Return the quarter of the date.

is_quarter_end : Return a boolean indicating whether the date is the
    last day of the quarter.

Examples
--------
>>> df = pd.DataFrame({'dates': pd.date_range("2017-03-30", periods=4)})
>>> df.assign(quarter = df.dates.dt.quarter,
...          is_quarter_start = df.dates.dt.is_quarter_start)
       dates  quarter  is_quarter_start
0 2017-03-30        1             False
1 2017-03-31        1             False
2 2017-04-01        2              True
3 2017-04-02        2             False

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
	No summary found (a short summary in a single line should be present at the beginning of the docstring)

```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.

* Short summary exceeds single line by one word, hope that is ok.

Labels:
name: Docs

Comments:
Hello @janelle! Thanks for updating the PR.



Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on March 14, 2018 at 18:47 Hours UTC
Thanks again :)
DOC: update the Period.dayofyear docstring
State: closed

Signed-off-by: Tushar Mittal <chiragmittal.mittal@gmail.com>

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [x] PR title is "DOC: update the <your-function-or-method> docstring"
- [x] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [x] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [x] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
################################################################################
##################### Docstring (pandas.Period.dayofyear)  #####################
################################################################################

Return the day of the year.

This attribute returns the day of the year on which the particular
date occurs. The return value ranges between 1 to 365 for regular
years and 1 to 366 for leap years.

Returns
-------
int
    The day of year.

See Also
--------
Period.dayofweek : Return the day of week.
Period.daysinmonth : Return the days in that month.
PeriodIndex.dayofyear : Return the day of year of all indexes. 

Examples
--------
>>> period = pd.Period("2015-10-23", freq='H')
>>> period.dayofyear
296
>>> period = pd.Period("2012-12-31", freq='D')
>>> period.dayofyear
366
>>> period = pd.Period("2013-01-01", freq='D')
>>> period.dayofyear
1

################################################################################
################################## Validation ##################################
################################################################################

Docstring for "pandas.Period.dayofyear" correct. :)
```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.


Labels:
name: Docs

Comments:
@jreback please review :slightly_smiling_face: 
made the required changes, please review @jorisvandenbossche :slightly_smiling_face: 
> Apart from the discussion about start/end in the summary line

Let's merge this, and will open a new issue to further discuss the confusion around start/end of the period. We can later fix the wording of the summary line.
@techytushar Thanks a lot!
I opened an issue here: https://github.com/pandas-dev/pandas/issues/20324
DOC: update the pandas.Series.dt.is_year_start docstring
State: closed

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [X] PR title is "DOC: update the <your-function-or-method> docstring"
- [X] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [X] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [X] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
################################################################################
################## Docstring (pandas.Series.dt.is_year_start) ##################
################################################################################

Return a boolean indicating whether the date is the first day of the
year.

Returns
-------
is_year_start : Series of boolean.

See Also
--------
is_year_end : Return a boolean indicating whether the date is the
    last day of the year.

Examples
--------
>>> dates = pd.Series(pd.date_range("2017-12-30", periods=3))
>>> dates
0   2017-12-30
1   2017-12-31
2   2018-01-01
dtype: datetime64[ns]
>>> dates.dt.is_year_start
0    False
1    False
2    True
dtype: bool

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
    No summary found (a short summary in a single line should be present at the beginning of the docstring)

```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.

* short summary exceeds one line by one word, hope that is ok


Labels:
name: Docs
name: Datetime
description: Datetime data dtype

Comments:
And thanks again :)
DOC: update the pandas.Series.dt.is_year_end docstring
State: closed

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [X] PR title is "DOC: update the <your-function-or-method> docstring"
- [X] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [X] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [X] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
################################################################################
################### Docstring (pandas.Series.dt.is_year_end) ###################
################################################################################

Return a boolean indicating whether the date is the last day of the year.

Returns
-------
is_year_end : Series of boolean.

See Also
--------
is_year_start : Return a boolean indicating whether the date is the first day of the year.

Examples
--------
>>> dates = pd.Series(pd.date_range("2017-12-30", periods=3))
>>> dates
0   2017-12-30
1   2017-12-31
2   2018-01-01
dtype: datetime64[ns]
>>> dates.dt.is_year_end
0    False
1     True
2    False
dtype: bool

################################################################################
################################## Validation ##################################
################################################################################

Errors found:
	No extended summary found

```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.

* No extended summary required


Labels:
name: Docs

Comments:
Hello @janelle! Thanks for updating the PR.

 - In the file [`pandas/core/indexes/datetimes.py`](https://github.com/pandas-dev/pandas/blob/61aedbc4780130d250d440f6e4398418ab481025/pandas/core/indexes/datetimes.py), following are the PEP8 issues :

> [Line 1793:80](https://github.com/pandas-dev/pandas/blob/61aedbc4780130d250d440f6e4398418ab481025/pandas/core/indexes/datetimes.py#L1793): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (80 > 79 characters)



##### Comment last updated on March 14, 2018 at 18:55 Hours UTC
Updated. Fixed some some See Alsos in the other docstrings where we said `method` instead of `property`.

Thanks again @janelle!
DOC: update the window.Rolling.min docstring
State: closed

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [ ] PR title is "DOC: update the <your-function-or-method> docstring"
- [ ] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [ ] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [ ] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
# paste output of "scripts/validate_docstrings.py <your-function-or-method>" here
# between the "```" (remove this comment, but keep the "```")

```

If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.


Checklist for other PRs (remove this part if you are doing a PR for the pandas documentation sprint):

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
Hello @gojandrooo! Thanks for updating the PR.



Cheers ! There are no PEP8 issues in this Pull Request. :beers: 

##### Comment last updated on March 17, 2018 at 11:49 Hours UTC
@gojandrooo Thanks!
DOC: update pandas.DataFrame.head docstring
State: closed

-Update wording to be accurate and match pandas.DataFrame.tail docstring

Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):

- [X ] PR title is "DOC: update the <your-function-or-method> docstring"
- [X] The validation script passes: `scripts/validate_docstrings.py <your-function-or-method>`
- [X] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [X] The html version looks good: `python doc/make.py --single <your-function-or-method>`
- [ ] It has been proofread on language by another sprint participant

Please include the output of the validation script below between the "```" ticks:

```
################################################################################
###################### Docstring (pandas.DataFrame.head)  ######################
################################################################################

Return the first `n` rows.

This function returns the first `n` rows for the object based
on position. It is useful for quickly testing if your object
has the right type of data in it.

Parameters
----------
n : int, default 5
    Number of rows to select.

Returns
-------
obj_head : type of caller
    The first `n` rows of the caller object.

See Also
--------
pandas.DataFrame.tail: Returns the last `n` rows.

Examples
--------
>>> df = pd.DataFrame({'animal':['alligator', 'bee', 'falcon', 'lion',
...                    'monkey', 'parrot', 'shark', 'whale', 'zebra']})
>>> df
      animal
0  alligator
1        bee
2     falcon
3       lion
4     monkey
5     parrot
6      shark
7      whale
8      zebra

Viewing the first 5 lines

>>> df.head()
      animal
0  alligator
1        bee
2     falcon
3       lion
4     monkey

Viewing the first `n` lines (three in this case)

>>> df.head(3)
      animal
0  alligator
1        bee
2     falcon

################################################################################
################################## Validation ##################################
################################################################################

Docstring for "pandas.DataFrame.head" correct. :)
```


Labels:
name: Docs

Comments:
lgtm
Thanks!
DOC: update `pandas/core/ops.py` docstring template to accept examples
State: closed

Checklist for the pandas documentation sprint

- [x] PR title is "DOC: update the <your-function-or-method> docstring"
- [x] The PEP8 style check passes: `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] It has been proofread on language by another sprint participant

The Chicago assigned docstrings uses a template with string formatting. To add examples for the various DataFrame operators, I modified the template to allow examples for each operator.

Opening this PR to get comments on this workflow.

I will work with all the ChiPy contributors to make sure we can get their examples in once we figure out the best way forward.

Labels:
name: Docs

Comments:
This one is tricky, since we have so many potential examples. I think ideally we would have a docstring stub that creates the dataframes, and then examples stubs for each of the arithmetic methods.
Something like (untested)


```python
_arith_frames = """\
>>> a = pd.DataFrame([1, 1, 1, np.nan], index=['a', 'b', 'c', 'd'],
                     columns=['one'])
>>> a
   one
a  1.0
b  1.0
c  1.0
d  NaN
>>> b = pd.DataFrame(dict(one=[1, np.nan, 1, np.nan],
                          two=[np.nan, 2, np.nan, 2]),
                     index=['a', 'b', 'd', 'e'])
>>> b
   one  two
a  1.0  NaN
b  NaN  2.0
d  1.0  NaN
e  NaN  2.0
"""

_add_doc_frame = """\
Examples
--------
{create}
>>> a.add(b, fill_value=0)
   one  two
a  2.0  NaN
b  1.0  2.0
c  1.0  NaN
d  1.0  NaN
e  NaN  2.0 
""".format(create=_arith_frames)
```
@alysivji are you basing all the examples off the same original dataframes? If not, then ignore my comments.
@alysivji Do you want us to merge this one? So it is easier for the other PRs to add the examples?
@TomAugspurger each team did different examples.

@jorisvandenbossche if we can come up with a best practice i think that would be best. i can help get all the examples in once we figure out the best workflow.
@alysivji I think you may know best here, since you've seen some of the other examples I think.

I suspect that the PRs would have many conflicts (removing the old example, updating the kwargs, etc.) and that the only distinct bits are the actual new example and updating the `df_examples` value. If that's the case, let's merge this and then start taking PRs that have an updated copy of master + the new example.
Yes, I think it is fine to merge this.
thanks @alysivji