BrandonFors/pandas-github-issues huggingface dataset:
DOC: Update the pandas.Index.is_ docstring
State: closed

- [x] closes https://github.com/pandanistas/pandanistas_sprint_ui2020/issues/6
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Output of `python scripts/validate_docstrings.py pandas.Index.is_`:
```
################################################################################
################################## Validation ##################################
################################################################################

1 Errors found:
        No examples section found
```

Labels:
name: Docs

Comments:
@garyteofanus can you see if @WillAyd's suggestion fixes the CI?
Closing as stale. @garyteofanus let us know if you finally want to finish this.
I'll submit a new pull request for this today as part of PyData Amsterdam sprint.
DOC: Fixed ES01, PR07, SA04 error in pandas.core.groupby.DataFrameGroupBy.shift
State: closed

- [x] closes: https://github.com/pandanistas/pandanistas_sprint_ui2020/issues/14
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Output of python scripts/validate_docstrings.py pandas.core.groupby.DataFrameGroupBy.shift:
```
################################################################################
################################## Validation ##################################
################################################################################

1 Errors found:
        No examples section found
```

Labels:
name: Docs

Comments:
Great thanks @Iqrar99 !
You are welcome! 😸
Fix PR08, RT02, RT03, and SA01 on pandas.Index.fillna
State: closed

- [x] closes #https://github.com/pandanistas/pandanistas_sprint_ui2020/issues/5
- [ ] tests added / passed
- [x] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
Why was all of those files in c4099b5 was removed?
@RafifEL looks like something went awry with the git workflow here. Can you `git checkout master FILENAME` for all the files you didn't update the docstring in and re-push?
> @RafifEL looks like something went awry with the git workflow here. Can you `git checkout master FILENAME` for all the files you didn't update the docstring in and re-push?

I'm sorry, I'm new to this stuff, is there anyway for me to hard reset to 1dbea46 commit?
Sure! From your branch try:

```sh
git reset --hard 1dbea46
git push -f origin rafif-feature
```
> Why was all of those files in [c4099b5](https://github.com/pandas-dev/pandas/commit/c4099b526ec0e1add6577f5d07d753860fce9b38) was removed?

I'm Sorry, i was trying to see the HTML of the documentation by using "python doc/make.py html". It got an Error, so i delete the reference folder on this branch to see it.
Thanks @RafifEL
DOC : fix errors docstrings pandas.to_numeric
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [x ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

added docstrings information about arg descriptions, downcast type 'int', and Return type


Labels:
name: Docs

Comments:
Thanks @isoletslicer
docs: fix SS06, PR08, RT02, RT03, SA04 in pandas.DatetimeIndex.indexe…
State: closed

…r_at_time

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

 Fix : https://github.com/pandanistas/pandanistas_sprint_ui2020/issues/8


Labels:
name: Docs

Comments:
Hello @rahmadiantio! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/core/indexes/datetimes.py`](https://github.com/pandas-dev/pandas/blob/739b94e30af46c3b34c517a99e4da37eb5ec4fe3/pandas/core/indexes/datetimes.py):

> [Line 718:72](https://github.com/pandas-dev/pandas/blob/739b94e30af46c3b34c517a99e4da37eb5ec4fe3/pandas/core/indexes/datetimes.py#L718): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 723:72](https://github.com/pandas-dev/pandas/blob/739b94e30af46c3b34c517a99e4da37eb5ec4fe3/pandas/core/indexes/datetimes.py#L723): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace



##### Comment last updated at 2020-02-29 05:20:26 UTC
Closing as stale. @rahmadiantio let us know if you finally want to address the review comments.
DOC: Update pandas.core.groupby.GroupBy.pipe docstring
State: closed

- [x] closes https://github.com/pandanistas/pandanistas_sprint_ui2020/issues/2
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
@hsjsjsj009 do you have time to address the comments? Would be great to get this merged.
Sorry, I just saw this email, I will do it today.

On Sun, Mar 8, 2020, 3:41 AM Marc Garcia <notifications@github.com> wrote:

> @hsjsjsj009 <https://github.com/hsjsjsj009> do you have time to address
> the comments? Would be great to get this merged.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/32352?email_source=notifications&email_token=ALI76F275UEZU3S2A2VZVV3RGKWQLA5CNFSM4K6NGZHKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEOEE5QQ#issuecomment-596135618>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ALI76FYV7KL5ZXIMV4E5EV3RGKWQLANCNFSM4K6NGZHA>
> .
>
DOC: Fix SS06 formatting errors in merge_asof docstrings
State: closed

Errors fixed (from the list in #29254 ):
pandas.merge_asof

Validated the fixes with python scripts/validate_docstrings.py
Refrencing issue: #29254

Fix : pandanistas/pandanistas_sprint_ui2020#11

Labels:
name: Docs

Comments:
Hello @NewbieWorks! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2020-02-29 05:08:01 UTC
Thanks @NewbieWorks
TYP: Update type naming in formatter
State: closed

- [x] part of #26792, #28480
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
Thanks @xcz011
C Functionality for Accessing DataFrame Values in Column Order
State: closed

This is very rough and was a little hesitant to even push here, but figured worth opening up to feedback.

The main motivation for this PR is to get block management out of the JSON serializer, but it could potentially be extended beyond that for external uses

The gist of this is that we can hold a struct `PdOrderedArrays` which gives the length of the DataFrame and sequential access to Numpy arrays that mirror what the user sees when dealing with a DataFrame, all by deconstructing the blocks that already exist down in some C functions

Labels:

Comments:
Hello @WillAyd! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/tests/frame/test_native.py`](https://github.com/pandas-dev/pandas/blob/132d59982882da91da6c78c142991eeba2f880e8/pandas/tests/frame/test_native.py):

> [Line 13:5](https://github.com/pandas-dev/pandas/blob/132d59982882da91da6c78c142991eeba2f880e8/pandas/tests/frame/test_native.py#L13): [E265](https://duckduckgo.com/?q=pep8%20E265) block comment should start with '# '




Is doing this in cython not an option?  i guess including it in the json code would be troublesome?

Do you envision this being used outside of the json code?  e.g. core.internals?

FWIW `BlockManager.shape` is surprisingly slow in some recent profilings, so optimizing it sounds good.
> Is doing this in cython not an option? i guess including it in the json code would be troublesome?

Truthfully didn't think much about that option, but maybe. I personally find this easier and think going the Cython route would still require a lot of C "bridging" (particularly to manage memory) though I'm probably biased by the amount of time I've spent in the JSON extension recently

> Do you envision this being used outside of the json code? e.g. core.internals?

For sure; would still have to evolve and wouldn't be something tackled at the outset, but I think giving third party developers a C API to the DataFrame could open up a lot of things
> going the Cython route would still require a lot of C "bridging"

Yah, ive never gotten this to work myself
I'll reopen later when more polished
BUG: None / Timedelta incorrectly returning NaT
State: closed

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

xref #31869, arguable whether or not this closes that.

Labels:
name: Bug
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Timedelta
description: Timedelta data type

Comments:
Not against the design just curious as to what your thought is as to why this should raise instead of returning NaN? Perhaps because np.nan / pd.NaT is ambiguous?
> why this should raise instead of returning NaN? Perhaps because np.nan / pd.NaT is ambiguous?

Think of it as if we had non-NA scalars of the same types/dtypes.  e.g. `2.0 / Timedelta(days=1)` is obviously gibberish.  So treat `np.nan / Timedelta(days=1)` the same
thanks
TST/REF: move tools test files
State: closed

These files are in the index tests, but they're not really testing the index objects.

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

Comments:
i'm not sure about date_range, period_range and timedelta_range as these only return Indexes and so are effectively Index constructors. see what others think.

the others make more sense. (the return value in the docs for pandas.to_timedelta https://dev.pandas.io/docs/reference/api/pandas.to_timedelta.html appears incorrect. Should be scalar, Series or TimedeltaIndex?)
> i'm not sure about date_range, period_range and timedelta_range as these only return Indexes and so are effectively Index constructors.

Thats reasonable.  My thought is that these are top-level convenience functions, and the directories they are currently in are getting crowded (and likely to become more so)
I agree with @simonjayhawkins. I tend to view these as "constructors" more than "tools".

How about `pandas/tests/indexes/datetimes/constructors/test_date_range.py` and then `pandas/tests/indexes/datetimes/test_constructors.py` could be `pandas/tests/indexes/datetimes/constructor/test_datetimeindex.py` or something?
will revert the non-consensus changes
Thanks @jbrockmendel
BUG: fixes unhandled NAType when plotting (#32073)
State: closed

- [x] closes #32073
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:

Comments:
I'm still getting familiar with testing in python, so I'm struggling a bit with tests.
But it would be nice to have at least a test included. Any guidelines on it?
Looking forward for the review.
ENH: implement fill_value for df.add(other=Series) #13488
State: closed

- [ ] closes #13488 
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Needs Discussion
description: Requires discussion from core team before further action

Comments:
All in all, I'd rather deprecate support for fill_value and ask users to do `fillna` on their own; I don't think the code complication is worth it
@jbrockmendel Thank you for reviewing this PR.  I'd be happy to try a PR for the deprecation of support for fill_value.  I'm new to open source (this is my first contribution) so I'd appreciate it if you could let me know whether this deprecation is worth spending my time on.  Otherwise, I'll select another open Pandas issue to work on.  
@jonathanrhughes welcome!  I would not advise doing that deprecation right away since it has not been agreed upon.  Your best bet is to look at issues with the "good first issue" tag (skip the first page or two of results, as those have gotten crowded).

> All in all, I'd rather deprecate support for fill_value and ask users to do `fillna` on their own; I don't think the code complication is worth it

I would agree with this

> @jonathanrhughes welcome! I would not advise doing that deprecation right away since it has not been agreed upon. Your best bet is to look at issues with the "good first issue" tag (skip the first page or two of results, as those have gotten crowded).

And this. Let's see what others think
But in any case @jonathanrhughes thanks for pushing this PR. Very impressive for a first time contribution!
@WillAyd I appreciate the feedback.  Thank you.  
Well its been 10 days and I haven't seen anything in support of this so going to close. But in any case thanks again @jonathanrhughes - the PR is impressive just not something we have an appetite for
BUG: Rolling groupby should not maintain the by column in the resulting DataFrame
State: closed

- [x] closes #32262
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Does this seem like the correct idea? If so, I'll expand on tests / write whatsnew / think about a cleaner patch

EDIT
----
lots of unwanted changes here, just seeing what tests fail

EDIT
----
need to check the types make sense and see what's the proper way to write
```
kwargs["exclusions"] = self.exclusions
```

Labels:
name: Groupby
name: Window
description: rolling, ewma, expanding

Comments:
@WillAyd thanks for your review - I've written it a different way (so no side-effects this time)
Thanks @jreback - that probably simplifies the patch then.

What about if we use `.resample`? e.g.
```
>>> df
           id  score
date                
2010-01-01  A      2
2010-01-02  A      3
2010-01-05  A      8
2010-01-10  A      7
2010-01-13  A      3
2010-01-01  B      5
2010-01-03  B      2
2010-01-04  B      1
2010-01-11  B      7
2010-01-14  B      3

>>> df.groupby("id").resample("D").asfreq()
                id  score
id date                  
A  2010-01-01    A    2.0
   2010-01-02    A    3.0
   2010-01-03  NaN    NaN
   2010-01-04  NaN    NaN
   2010-01-05    A    8.0
   2010-01-06  NaN    NaN
   2010-01-07  NaN    NaN
   2010-01-08  NaN    NaN
   2010-01-09  NaN    NaN
   2010-01-10    A    7.0
   2010-01-11  NaN    NaN
   2010-01-12  NaN    NaN
   2010-01-13    A    3.0
B  2010-01-01    B    5.0
   2010-01-02  NaN    NaN
   2010-01-03    B    2.0
   2010-01-04    B    1.0
   2010-01-05  NaN    NaN
   2010-01-06  NaN    NaN
   2010-01-07  NaN    NaN
   2010-01-08  NaN    NaN
   2010-01-09  NaN    NaN
   2010-01-10  NaN    NaN
   2010-01-11    B    7.0
   2010-01-12  NaN    NaN
   2010-01-13  NaN    NaN
   2010-01-14    B    3.0
```
This is the output that's currently being tested for in `pandas/tests/resample/test_resampler_grouper.py` - this one's correct as it is, then?
@jreback have pushed a new fix. Have had to update some tests which check output against `groupby.apply`
Screenshot of whatsnew:

![image](https://user-images.githubusercontent.com/33491632/76016399-a62a5c00-5f14-11ea-991c-8c6853561d7d.png)

> where? let's fix that instead ofworking around. try/excepts are terrible to do around things like this.

Thanks for your feedback/patience, I'm really grateful to you (and the rest of the core team) for your reviews and am learning so much by doing this
Yes, I see what you mean - to be honest I can't think of a clean solution, and have spent a while on it already. I'll close this for now so someone else can take it up
STY: spaces in wrong place
State: closed

- [x] ref #30755
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry



Labels:
name: Code Style
description: Code style, linting, code_checks
name: Clean

Comments:
Thanks @MomIsBestFriend
Fix exception causes all over the code
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Thanks @cool-RR 
I just made a blog post about this change here: https://blog.ram.rachum.com/post/621791438475296768/improving-python-exception-chaining-with
BUG: parse_dates may have columns not in dataframe
State: closed

read_csv will raise ValueError when columnes used for parse_dates are found in the dataframe.

- [x] closes #31251 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO CSV
description: read_csv, to_csv

Comments:
Hi @jreback @gfyoung - Could you please review. I incorporated the changes given in #31815 
Hello @sathyz! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:





There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2020-03-12 02:35:27 UTC
One minor doc fix, but otherwise, these changes look good.  Nice job with the testing!
@gfyoung  done! Thanks for the corrections. I didn't notice these mistakes.
@pandas-dev/pandas-core : These `mypy` failures [here](https://github.com/pandas-dev/pandas/pull/32320/checks?check_run_id=485190447#step:11:18) look unrelated to this PR.
> @pandas-dev/pandas-core : These `mypy` failures [here](https://github.com/pandas-dev/pandas/pull/32320/checks?check_run_id=485190447#step:11:18) look unrelated to this PR.

xref #32438
What do I have to do? Do I have to fix it to merge this PR? 
> What do I have to do? Do I have to fix it to merge this PR?

you need to merge master see https://pandas.io/docs/development/contributing.html#updating-your-pull-request
Last couple of times I did that #31815 #31550 and it was not smooth. Let me try this time.
I am not sure what is failing in docs, how do I debug.
@pandas-dev/pandas-core 
Any updates? How do I fix the problem in docs?
> Any updates? How do I fix the problem in docs?

The docs fetch a url from some other projects, to know the absolute url of a page when we write something like `:ref:numpy.array`. Looks like an error in GitHub pages was making the StatsModels website fail, and that caused the fetching of their url to fail in the build in your PR.

I guess that should be fixed not. A simple `git fetch upstream && git merge upstream/master && git push` should restart all jobs, and hopefully get the CI green this time.
Done, please merge.
@jreback done. Please review.
Thanks @sathyz  - great first PR
CLN: remove _igetitem_cache
State: closed

Only used once (recent bugfixes got rid of the user uses IIRC) and its just an extra layer that isnt needed.

Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
> Has this a performance implication?

The only user-facing paths affected are `iat.__setitem__` and `at.__setitem__`.  With unique columns this is 3x slower because we are no longer caching a Series object.  With non-unique columns this is ~4% faster because of a skipped check.  The benefit is in getting rid of the code path.
REGR: SeriesGroupby transform unique
State: closed

- [x] closes #31849 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Groupby

Comments:
Hello @MarcoGorelli! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:







There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2020-02-28 10:04:54 UTC
Posted comments in the original issue but I am -1 on making this change
closing this as closed the issue. This is not a valid transformation kernal.
TST: Using  more fixtures in of tests/base/test_ops.py
State: closed

part of #23877
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`



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

Comments:
the diff looks a little mangled; is this all basically un-indent?
@jbrockmendel Not entirely. I had to extend the tests or add some extra conditions because the fixtures are more versatile than the original test values
Can these just be split into separate tests for index / series? One-offs are fine but this seems to branch a lot within the test based on the type of object, which makes the purpose of the test less clear
@WillAyd I guess you're referring to `test_memory_usage` as the others don't really branch for logic just relevant to indices or series. I put the series-specific logic of this test into two new ones.

I kept narrow_series and series_with_simple_index separated as I don't want to create another combined fixture with a very narrow use case.

Please have another look
thanks @SaturnFromTitan
DOC: Add examples to the method MultiIndex.is_lexsorted()
State: closed

- [ ] xref #32179
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: MultiIndex

Comments:
Sure, happy to add more clarification to this function. I added this example with some explanation, though just made it shorter, so it would be easier to follow.
Thanks @RaisaDZ
TST: refactored test_factorize
State: closed

part of #23877
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`



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

Comments:
I think I addressed all your comments @WillAyd 
@jreback took care of your comment and CI is green now
@jreback @WillAyd CI is green with two approvals. Can it be merged?
Thanks @SaturnFromTitan
BUG: PeriodIndex.asof_locs
State: closed


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
looks fine. does this have any user facing impliacations? e.g. does it need a whatsnew
> does this have any user facing impliacations? e.g. does it need a whatsnew

passing nonsense (e.g. an Int64Index) to `Series.asof` with a PeriodIndex will now raise instead of silently being wrong
thanks !
BUG: set df.plot.area linewidth to 0
State: closed


- [x] closes #32106 
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry (`1.1.0`)


Labels:
name: Visualization
description: plotting

Comments:
Sure, however tests as they are don't pass on my machine: 7 of them fail and I can't really make sense of the logs, even on upstream master 8 won't pass.
I included them if you want to help me have a look: [pandas_test.log](https://github.com/pandas-dev/pandas/files/4266534/pandas_test.log).
@leandermaben Can you open an issue for the failing tests?
@leogermond not sure about your local environment but can you still add one here? Can leverage CI
Closing as stale, but happy to reopen if you want to address comments and provide a test