DOC: #22899, Fixed docstring of itertuples in pandas/core/frame.py
State: closed

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

#22899 
I went ahead and followed the docstring conventions mentioned here: 

https://pandas.pydata.org/pandas-docs/stable/contributing_docstring.html

The fixes I made were for the following errors:

<img width="891" alt="screen shot 2018-09-29 at 19 17 59" src="https://user-images.githubusercontent.com/16315857/46252338-740df400-c41c-11e8-9c29-ff955c9b9705.png">
<img width="618" alt="screen shot 2018-09-29 at 19 18 08" src="https://user-images.githubusercontent.com/16315857/46252339-76704e00-c41c-11e8-89d5-adab168dc329.png">

- Fixed whitespace between closing line and end of docstring
- Converted summary into single line
- Added `Returns` section (Not sure if done correctly!)
- Fixed examples to pass test by adding `...` at line 914
- Fixed namedtuple return values at 922 and 923 

Please let me know if there are any issues and I will try my best to fix them ASAP.

Thank you!~ 

Labels:
name: Docs
name: DataFrame
description: DataFrame data structure

Comments:
Hello @leeyspaul! Thanks for submitting the PR.

 - There are no PEP8 issues in the file [`pandas/core/frame.py`](https://github.com/leeyspaul/pandas/blob/c68feec320115347cc574e08a6d2ec70f70a77b3/pandas/core/frame.py) !


# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22902?src=pr&el=h1) Report
> Merging [#22902](https://codecov.io/gh/pandas-dev/pandas/pull/22902?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/f771ef67e8fa3f395967d5c02918fbbc3410612a?src=pr&el=desc) will **increase** coverage by `0.88%`.
> The diff coverage is `n/a`.

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

```diff
@@            Coverage Diff             @@
##           master   #22902      +/-   ##
==========================================
+ Coverage   92.18%   93.07%   +0.88%     
==========================================
  Files         169      169              
  Lines       50830    58302    +7472     
==========================================
+ Hits        46860    54262    +7402     
- Misses       3970     4040      +70
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `91.46% <ø> (+0.86%)` | :arrow_up: |
| #single | `44.46% <ø> (+2.08%)` | :arrow_up: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/22902?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97.76% <ø> (+0.56%)` | :arrow_up: |
| [pandas/core/dtypes/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Jhc2UucHk=) | `100% <0%> (ø)` | :arrow_up: |
| [pandas/core/strings.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3RyaW5ncy5weQ==) | `98.66% <0%> (+0.02%)` | :arrow_up: |
| [pandas/core/panel.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcGFuZWwucHk=) | `97.93% <0%> (+0.03%)` | :arrow_up: |
| [pandas/core/dtypes/cast.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZHR5cGVzL2Nhc3QucHk=) | `88.9% <0%> (+0.32%)` | :arrow_up: |
| [pandas/core/resample.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvcmVzYW1wbGUucHk=) | `97.29% <0%> (+0.32%)` | :arrow_up: |
| [pandas/core/sparse/series.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvc3BhcnNlL3Nlcmllcy5weQ==) | `95.77% <0%> (+0.55%)` | :arrow_up: |
| [pandas/core/arrays/base.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvYXJyYXlzL2Jhc2UucHk=) | `94.8% <0%> (+0.56%)` | :arrow_up: |
| [pandas/core/indexes/datetimelike.py](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvaW5kZXhlcy9kYXRldGltZWxpa2UucHk=) | `98.68% <0%> (+0.58%)` | :arrow_up: |
| ... and [19 more](https://codecov.io/gh/pandas-dev/pandas/pull/22902/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/22902?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/22902?src=pr&el=footer). Last update [f771ef6...064cf33](https://codecov.io/gh/pandas-dev/pandas/pull/22902?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).

@datapythonista awesome! Thanks for all your guidance - super helpful! I'd love to contribute more, I saw issue #22896 was still not picked up. I'd like to work on it after this gets merged if possible. 


@leeyspaul you're working on a branch, so... `git checkout master && git checkout -b <other-docstring-branch>` is the only thing you need to start, even if it takes a bit to merge this. :)

Just add a comment to the issue you start working on, so nobody else works on it. Thanks!
Hey @datapythonista ! I saw that the Travis CI build failed I was wondering if this was something on my end that I need to fix. Thanks, and I'll get working on that other issue #22896 .
They seem unrelated to your changes, a url that was not available. Travis is running again, let's see if this time we're lucky.
Roger! :)
Still no luck, I'm wondering what the issue is. I haven't done much with travis-ci so I'm not sure. @datapythonista Please let me know if there is a way I can help. :)
Same thing is happening with some of my PR's. If you look in the travis log you can see this line in the feedback from the failing tests:

```
Exception requests.exceptions.ConnectionError: ConnectionError(u'Connection refused: PUT https://pandas-test.s3.amazonaws.com/pyarrow.parquet',) in <bound method S3File.__del__ of <S3File pandas-test/pyarrow.parquet>> ignored
```

It looks like an issue with an url in the tests, so not related to our code.
@leeyspaul @JustinZhengBC the problem with travis is unrelated your PRs, the issue is being tracked in #22934. Just ignore the error, we'll take care of it.
thanks @leeyspaul