Fixed docstrings as referenced in issue no: #24071
State: closed

- [1] closes #24071 
- [1] tests added / passed
- [0] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [0] whatsnew entry

tests : `./scripts/validate_docstrings.py --prefix=pandas.core --errors=GL01,GL02`

Labels:
name: Docs

Comments:
# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26520?src=pr&el=h1) Report
> Merging [#26520](https://codecov.io/gh/pandas-dev/pandas/pull/26520?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ba48fc4a033f11513fa2dd44c946e18b7bc27ad2?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #26520      +/-   ##
==========================================
- Coverage   91.75%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50665    50665              
==========================================
- Hits        46489    46485       -4     
- Misses       4176     4180       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.26% <100%> (ø)` | :arrow_up: |
| #single | `41.71% <100%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26520?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/groupby/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/26520/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9ncm91cGJ5LnB5) | `97.23% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26520/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26520/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97% <0%> (-0.12%)` | :arrow_down: |

------

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

# [Codecov](https://codecov.io/gh/pandas-dev/pandas/pull/26520?src=pr&el=h1) Report
> Merging [#26520](https://codecov.io/gh/pandas-dev/pandas/pull/26520?src=pr&el=desc) into [master](https://codecov.io/gh/pandas-dev/pandas/commit/ba48fc4a033f11513fa2dd44c946e18b7bc27ad2?src=pr&el=desc) will **decrease** coverage by `<.01%`.
> The diff coverage is `100%`.

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

```diff
@@            Coverage Diff             @@
##           master   #26520      +/-   ##
==========================================
- Coverage   91.75%   91.74%   -0.01%     
==========================================
  Files         174      174              
  Lines       50665    50665              
==========================================
- Hits        46489    46485       -4     
- Misses       4176     4180       +4
```

| Flag | Coverage Δ | |
|---|---|---|
| #multiple | `90.26% <100%> (ø)` | :arrow_up: |
| #single | `41.71% <100%> (-0.09%)` | :arrow_down: |

| [Impacted Files](https://codecov.io/gh/pandas-dev/pandas/pull/26520?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pandas/core/groupby/groupby.py](https://codecov.io/gh/pandas-dev/pandas/pull/26520/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZ3JvdXBieS9ncm91cGJ5LnB5) | `97.23% <100%> (ø)` | :arrow_up: |
| [pandas/io/gbq.py](https://codecov.io/gh/pandas-dev/pandas/pull/26520/diff?src=pr&el=tree#diff-cGFuZGFzL2lvL2dicS5weQ==) | `78.94% <0%> (-10.53%)` | :arrow_down: |
| [pandas/core/frame.py](https://codecov.io/gh/pandas-dev/pandas/pull/26520/diff?src=pr&el=tree#diff-cGFuZGFzL2NvcmUvZnJhbWUucHk=) | `97% <0%> (-0.12%)` | :arrow_down: |

------

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

Does this fully close the issue? There was a previous PR for this (#26037) which contained a few more changes so think some of that might need to be included here as well
This lgtm, but won't be that useful if we don't continue  fixing the rest of `GL01` and `GL02` errors. The problem is that if we just fix this, we can't add the validation of the errors to the CI (in `ci/code_checks.sh`, in the docstrings part). And if we don't do it, then we'll eventually have couple more docstrings wrong in `pandas.core`, and we'll have to keep opening these small PRs.

@killerontherun1 if you can work on this, what would be very useful would be to address all the errors in `/scripts/validate_docstrings.py --errors=GL01,GL02`. They seem a lot, but most of them are from the same docstrings (or very similar ones next to each other). And then add `GL01` and `GL02` to `ci/code_checks.sh`, so in every PR we make sure that no docstrings with wrong opening/closing quotes can be added in the future.

Do you have time to work on those and add the fixes to this PR?
@datapythonista : Yes please! I'd love to take this up. I ran `/scripts/validate_docstrings.py --errors=GL01,GL02` on my local environment post merging and rebasing and it doesn't give me any errors. Am I doing something wrong to be missing these in my env? Or is there another script/parameter combination I need to run to produce more errors? Also, I was checking out other error codes. I would be happy to address those too. 

I do have the time. Please let me know how I should move forward. 

EDIT: Apologies, I had ran it with the prefix addressing only those in `pandas.core`. Will fix the rest and keep updating this PR. 

@killerontherun1 not sure what happened here but this looks to have brought in a lot of other changes. Are you merging the upstream master?
@killerontherun1 you may be able to restore your branch with the instructions of the first section in https://datapythonista.github.io/blog/useful-git-commands.html

Not sure what caused the problem, but when merging master, you should be using `git fetch upstream` and `git merge upstream/master`, and this state where you have unrelated commits shouldn't happen.

And what you did initially was correct, the issue you were addressing was to fix the docstrings in `pandas.core`, and in general we discourage adding unrelated changed. But in this case that ticket was almost addressed by another PR, and what it's more useful now is to fix all `GL01` and `GL02` errors, so they are not introduced again. Thanks for helping with that.
Got it. So there are other changes in the last three commits that are not part of the docstring_fix branch from earlier? 

I think I merged master with this branch by mistake. 

So sorry, but I'm new to this. What exactly should I do? Should I create patches for each of the commits and apply them after I revert the current head to the state before the merge? My git log looks like this:
```
commit 0341bf48c08ea2e893494957816b9e2cc1fa85ac (HEAD -> docstring_fix, origin/docstring_fix)
Author: 
Date:   Sun May 26 11:21:12 2019 +0530

    solved GL01 GL02 for pandas.Index.T

commit c9d2fb51b65b33d359790b3f41d6bcd96e457df4
Author: 
Date:   Sun May 26 11:15:07 2019 +0530

    solved GL01 GL02 for pandas.HDFStore

commit 3b572139874d0fb6b578f5e89e905d93747d966f
Author: 
Date:   Sun May 26 11:11:55 2019 +0530

    GL01 and GL02 solved for pandas.eval

commit 67ebeb9e585d670b76365a0b8aef62fa2a88593d
Author: 
Date:   Sun May 26 10:49:23 2019 +0530

    Fixed GL01 and GL02 in pandas.api

commit 3e32dcdfe4aacccc89b799846d95d13262488363
Merge: 62deebc27 b72832d68
Author: 
Date:   Sat May 25 20:21:10 2019 +0530

    Merge branch 'master' into docstring_fix


```
If you check the "Files changed" tab of this PR you'll see that there is plenty of unrelated stuff. With some luck, you can fix this with the link I provided.
Yep. Lot of file changes. Thanks so much for the link. I went through the options, but none of them seem to be helping me sort out my branch. It is be because I merged the master with this branch. Man, my branch is a real mess now. 

Any idea how I can rebase this branch to my first commit so that I can remove the other unrelated commits from here? 
if the instructions in the link I sent don't work, you'll probably want to start a new branch from an updated master, and manually apply the relevant commits from this branch there.
Yep. Just doing that. Sorry, but major noob question again. Is it possible
for me to update this same PR with a new branch with just the related
changes? Or would I have to raise a new PR with the changes and we could
close this one?



Warm Regards,

Mathew George
Mob: +91-9820502747


On Sun, May 26, 2019 at 3:19 PM Marc Garcia <notifications@github.com>
wrote:

> if the instructions in the link I sent don't work, you'll probably want to
> start a new branch from an updated master, and manually apply the relevant
> commits from this branch there.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/26520?email_source=notifications&email_token=AF2JNPA7PGQ55XFARSPQXT3PXJMI5A5CNFSM4HPUUFMKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODWICAUI#issuecomment-495984721>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AF2JNPDL2HI3PETBTKWGDLTPXJMI5ANCNFSM4HPUUFMA>
> .
>

You surely can, but if you're unsure of those things, better do the simplest thing. pandas is not the best project for experimenting, this is creating noise for too many people.
Closing this PR. I'm terribly sorry about the noise. Did not mean to waste anybody's time. Thank you so much for your patience with me. 
No worries, this problem with the branch happens very often (that's why I wrote the post on how to fix it).

My point is only to better not try fancy things pushing here, as this notifies many people. Feel free to open a new PR with the changes, and let's continue there. Thanks!