BrandonFors/pandas-github-issues huggingface dataset:
DOC: Clarify DataFrame column argument in API documentation
State: closed

- [x] closes #39904
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them


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

Comments:
Hello @DriesSchaumont! 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 2021-03-29 13:59:33 UTC
ping @rhshadrach
@DriesSchaumont thanks a lot for your PR!
REGR: missing vals not replaceable in categorical
State: closed

- [x] closes #40472
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry

This restores behavior to before the regression, but I think also deprecating this behavior while patching might be reasonable. Since categoricals represent all missing values the same way, this allows unintuitive behavior like
```
ser = pd.Series([None, "b"]).astype('category')
ser = ser.replace({np.nan: 'c'})
print(ser)
```

replacing the missing value even though `None` and `np.nan` are different missing values. Forcing usage of the more explicit `fillna` seems more reasonable in this case.

Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: Categorical
description: Categorical Data Type
name: replace
description: replace method

Comments:
Hello @mzeitlin11! 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 2021-03-27 17:07:49 UTC
Ah makes sense, will close until discussion resolved
CLN: move pytest config to pyproject.toml
State: closed

According to https://docs.pytest.org/en/stable/customize.html, using `setup.cfg`as pytest config file is not recommended. So moved everything to `pyproject.toml`


Labels:
name: Build
description: Library building on various platforms

Comments:
I'm reticent to do this.  The everything-in-one-file nature of setup.cfg is really nice improvement over the older proliferation of config files
> I'm reticent to do this. The everything-in-one-file nature of setup.cfg is really nice improvement over the older proliferation of config files

Isn't pyproject.toml the "new" everything-in-one file? I would love to be able to use `poetry update` in the source tree to get all dependencies installed/updated (would need to move all the depdencies to pyproject.toml).
can we move *everything* to pyproject.toml? (or is this not supported for some things yet)?
> can we move _everything_ to pyproject.toml? (or is this not supported for some things yet)?

We can also move `isort` to pyproject.toml. But other tools don't support it yet. 
And seems like mypy is going to support pyproject.toml soon https://github.com/python/mypy/pull/10219.
Black doesn't support setup.cfg, flake8 doesn't support pyproject.toml, and the xkcd comic about standards is as relevant as ever 😆 

Anyway if the pytest docs advise against setup.cfg for pytest, then this PR seems like a good idea, thanks for doing it
LOL... Let me put it here.

![](https://imgs.xkcd.com/comics/standards.png)

this looks like a net improvement to me, sure we can't move everything yet, but newer versions you can (e.g. isort)

cc @jorisvandenbossche @jbrockmendel 
as long as we have someone who is competent with toml to maintain this file, no objection here
hmm somehow a conflict, can you merge master
Thanks @fangchenli !
@fangchenli running the tests locally, test-data.xml is generated and is an untracked file. probably need to add to git ignore to clean up.
DOC: Update CSS alignment for main documentation page
State: closed

Updates some CSS to better align buttons on the main documentation page. Seems to be an improvement when built locally (I'm using Ubuntu Firefox) but likely worth checking on other platforms / browsers.

Before:
![image](https://user-images.githubusercontent.com/2658661/112676134-0fd61a80-8e36-11eb-863a-9aa16c837a20.png)

After:
![image](https://user-images.githubusercontent.com/2658661/112675603-5ecf8000-8e35-11eb-9a5f-3ad435dba25b.png)

Labels:
name: Docs

Comments:
Thanks for looking into this @dsaxton! 
I updated my old PR https://github.com/pandas-dev/pandas/pull/34065, so that is an alternative for this.
> Thanks for looking into this @dsaxton!
> I updated my old PR #34065, so that is an alternative for this.

Sure, I was thinking that PR would supersede this one. I mostly put this up in case we wanted to fix the alignment issue only before deciding on whether to use the sphinx extension (we can close this if the other is merged first).
Seems Jeff is in favor of the sphinx extension approach so closing this
BUG: read_excel failed with empty rows after MultiIndex header
State: closed

- [x] closes #40442
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry

Prior to this fix, a blank data row after a MultiIndex header was a interpreted as containing a blank index name, but that only works if the user has specified an index column. If index_col is None all subsequent rows should be treated as data, even if the first one is empty.

Labels:
name: Bug
name: IO Excel
description: read_excel, to_excel

Comments:
@dsaxton thanks for catching those
@jreback I've added the new comments; let me know if anything else is needed. Thanks
thanks @ahawryluk very nice
DOC: Change user guide style notebook to reST
State: closed

This way, the content is parsed by Sphinx so that links to the documentation can be automatically inserted.

The downside is, that the downloadable notebook is not as pretty as before (because it contains raw cells with reST code).

Is this something worth the effort?

- [ ] closes #40645
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
Superseded by  #39720.
DOC array_algos/take method format update
State: closed

Not sure fill_value and indexer definitions in the _take_nd_ndarray method but filled out what I could

Labels:

Comments:
Hello @LucasHynes! 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/core/array_algos/take.py`](https://github.com/pandas-dev/pandas/blob/5abe8864a84d9feb23e47ecf3150b50b1aa63134/pandas/core/array_algos/take.py):

> [Line 126:62](https://github.com/pandas-dev/pandas/blob/5abe8864a84d9feb23e47ecf3150b50b1aa63134/pandas/core/array_algos/take.py#L126): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace

* In the file [`pandas/core/groupby/base.py`](https://github.com/pandas-dev/pandas/blob/5abe8864a84d9feb23e47ecf3150b50b1aa63134/pandas/core/groupby/base.py):

> [Line 31:13](https://github.com/pandas-dev/pandas/blob/5abe8864a84d9feb23e47ecf3150b50b1aa63134/pandas/core/groupby/base.py#L31): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace


Hi @LucasHynes, thanks for the pr! Looks like you've put up a few of these - while internal docstrings can be helpful, they are also pretty difficult to do correctly with significant internals knowledge. If interested in contributing to the docs, could have much larger positive user facing impact looking at any of the open issues labeled with `doc` (there are a lot!)

Regardless, for prs like this I'd recommend reading through https://pandas.pydata.org/docs/development/contributing_docstring.html (and the rest of the contributing guide, especially documentation section)
DOC: release notes for 1.3.0 Styler
State: closed

Added a note to the enhancements section detailing some different upgrades to `Styler` for 1.3.0

If this is not standard or unnecessary just close this PR - I'm only including it in case it is helpful (it is not for self-publication), so I am completely indifferent!

Hopefully there will be one or two more items to add before the end of May.


Labels:
name: Docs
name: Styler
description: conditional formatting using DataFrame.style

Comments:
can you merge master and ping on green
@jreback pinging green now
add deltalake to eco system doc page
State: closed

- [x] relates to #35017
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them


Labels:
name: Docs
name: IO Data
description: IO issues that don't fit into a more specific label

Comments:
Thanks @houqp. CI failures unrelated 
@mroeschke @jreback I am not seeing this change show up in the official doc, do you know what did I miss in my PR?
this will be in 1.3 releasing soon 
you can see the changes at https://pandas.pydata.org/pandas-docs/dev/ecosystem.html?highlight=ecosystem#deltalake
thank you @jreback @simonjayhawkins for the context and confirmation!
ENH: Addition of input arguments for boundaries to add more consistency between methods
State: closed

- [x] closes #40245
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry


Labels:

Comments:
Hello @hewittk! 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/core/arrays/datetimelike.py`](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/arrays/datetimelike.py):

> [Line 1833:33](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/arrays/datetimelike.py#L1833): [E712](https://duckduckgo.com/?q=pep8%20E712) comparison to True should be 'if cond is True:' or 'if cond:'
> [Line 1840:37](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/arrays/datetimelike.py#L1840): [E712](https://duckduckgo.com/?q=pep8%20E712) comparison to False should be 'if cond is False:' or 'if not cond:'
> [Line 1844:89](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/arrays/datetimelike.py#L1844): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (114 > 88 characters)

* In the file [`pandas/core/series.py`](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/series.py):

> [Line 4741:22](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/series.py#L4741): [E712](https://duckduckgo.com/?q=pep8%20E712) comparison to True should be 'if cond is True:' or 'if cond:'
> [Line 4750:24](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/series.py#L4750): [E712](https://duckduckgo.com/?q=pep8%20E712) comparison to False should be 'if cond is False:' or 'if not cond:'
> [Line 4754:89](https://github.com/pandas-dev/pandas/blob/438f1baaee66c44ae96653c9ce00e342afbc17f3/pandas/core/series.py#L4754): [E501](https://duckduckgo.com/?q=pep8%20E501) line too long (106 > 88 characters)
REF: SingleBlockManager dont subclass BlockManager
State: closed

Instead, most of BlockManager becomes _BlockManager which is subclassed by SingleBlockManager and BlockManager, the latter holding only the 2d-specific BM methods.

Motivation: putting BlockManager constructor in cython gives a much bigger gain if we can define `__cinit__`, and we can't do that with the two subclasses having mismatched `__init__` signatures.

Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
@jreback gentle ping, this is preliminary to some nice perf (constructor) improvements (along with #40776, #40757)
TYP: intp in libalgos
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: 32bit
description: 32-bit systems
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
@jbrockmendel quick question here so I can be consistent with this as well. What's the rationale behind when we use `intp` vs `int64`? Seems like you've mostly been changing arrays responsible for indexing to `intp`, but not others - are there places we should prefer `int64` to `intp` or would the ultimate goal be to transition to always using `intp`?
basically any ndarray we want to use as an indexer, e.g. `arr[indexer]` or `arr.take(indexer)` should be intp (because numpy will cast it if it isnt, so we can avoid making a copy)
BUG: groupby any/all raising on extension types
State: closed

- [x] closes #40585
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry

Will follow up by looking into #37506 so that the `skipna=False` case can also be handled correctly.

Labels:
name: Bug
name: Groupby
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays

Comments:
@mzeitlin11 - Does this PR also impact SeriesGroupBy?
> @mzeitlin11 - Does this PR also impact SeriesGroupBy?

Thanks for bringing this up! Was also failing for `SeriesGroupBy`, have amended test and whatsnew
Going to close in favor of a more comprehensive approach for #37506, for which this does not end up a helpful starting point
PERF: cache_readonly for Block properties
State: closed

We'll be able to cache more aggressively following each of #35417, #40574, and #40263

Labels:
name: Performance
description: Memory or execution speed performance
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
@simonjayhawkins IIRC we discussed what it would take to make mypy understand cache_readonly.  do you still have that available?
thanks
DOC: _array_strptime_with_fallback method def
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry


Labels:
name: Stale

Comments:
Hello @LucasHynes! 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/groupby/base.py`](https://github.com/pandas-dev/pandas/blob/07c91c305db38453a5770cba9f1f73388f4e23a9/pandas/core/groupby/base.py):

> [Line 31:13](https://github.com/pandas-dev/pandas/blob/07c91c305db38453a5770cba9f1f73388f4e23a9/pandas/core/groupby/base.py#L31): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace

* In the file [`pandas/core/tools/datetimes.py`](https://github.com/pandas-dev/pandas/blob/07c91c305db38453a5770cba9f1f73388f4e23a9/pandas/core/tools/datetimes.py):

> [Line 442:68](https://github.com/pandas-dev/pandas/blob/07c91c305db38453a5770cba9f1f73388f4e23a9/pandas/core/tools/datetimes.py#L442): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace



##### Comment last updated at 2021-03-25 20:35:41 UTC
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.
closing as stale. ping when ready to continue and i'll reopen
REF: remove DatetimeBlock, TimeDeltaBlock
State: closed

sits on top of #40456

Labels:
name: Refactor
description: Internal refactoring of code
name: Internals
description: Related to non-user accessible pandas implementation

Comments:
Similarly as https://github.com/pandas-dev/pandas/pull/40527, we should maybe first deprecate those Block classes before removing them?
why? what is using them 
In pyarrow, we are explicitly using CategoricalBlock, DatetimeTZBlock, ObjectBlock and ExtensionBlock. So not DatetimeBlock or TimedeltaBlock, but that's only one data point, and given that we are already using many of the block classes, I think we should be careful with removing any of them.
These are things that downstream libraries _shouldnt_ be using.  If this breaks something for someone we can deprecate like we did for CategoricalBlock, but I don't see any reason to do so pre-emptively, given that no one chimed in in #40226 saying they use these.
i agree with @jbrockmendel 
perpetuating internals is not great

if something downstream is breaking that we can re add and depreciate
PERF: increase the minimum number of elements to use numexpr for ops from 1e4 to 1e6
State: closed

Closes #40500, see that issue for the analysis of speedup vs size.

Another take of https://github.com/pandas-dev/pandas/pull/40502, but hopefully now without crashing the tests because of increased memory use.

Labels:
name: Performance
description: Memory or execution speed performance
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

Comments:
This time the tests are passing!
cc @rhshadrach i believe you saw memory issues with the previous PR, can you test this out?
@jreback the memory issues were actually present on CI (we just ignored the failing tests when merging ;)), and now not anymore
ok great
REGR: replace with multivalued regex raising
State: closed

- [x] closes #39338
- [x] tests added / passed
- [x] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [x] whatsnew entry

Issue comes from the first pair in the `regex` arg hitting the simple replace path, which causes the `ObjectBlock` to be split. From here, the mask indexing will be wrong, but that will not cause an error unless a later  pair hits `_replace_regex`, which actually uses the mask.

Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: Internals
description: Related to non-user accessible pandas implementation
name: replace
description: replace method

Comments:
thanks @mzeitlin11 
@meeseeksdev backport 1.2.x
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
$ git checkout 1.2.x
$ git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
$ git cherry-pick -m1 03546205f51697ed43a905b37b9ce913da84f1f6
```

3. You will likely have some merge/cherry-pick conflict here, fix them and commit:

```
$ git commit -am 'Backport PR #40604: REGR: replace with multivalued regex raising'
```

4. Push to a named branch :

```
git push YOURFORK 1.2.x:auto-backport-of-pr-40604-on-1.2.x
```

5. Create a PR against branch 1.2.x, I would have named this PR:

> "Backport PR #40604 on branch 1.2.x"

And apply the correct labels and milestones.

Congratulation you did some good work ! Hopefully your backport PR will be tested by the continuous integration and merged soon!

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
DOC: _guess_time_format_for_array method desc
State: closed

Method description added for the method

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry


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

Comments:
Hello @LucasHynes! 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/tools/times.py`](https://github.com/pandas-dev/pandas/blob/14667018df59736dcadbdcd5374c3fb0b29f65d7/pandas/core/tools/times.py):

> [Line 139:1](https://github.com/pandas-dev/pandas/blob/14667018df59736dcadbdcd5374c3fb0b29f65d7/pandas/core/tools/times.py#L139): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace
> [Line 144:1](https://github.com/pandas-dev/pandas/blob/14667018df59736dcadbdcd5374c3fb0b29f65d7/pandas/core/tools/times.py#L144): [W293](https://duckduckgo.com/?q=pep8%20W293) blank line contains whitespace



##### Comment last updated at 2021-03-24 15:16:01 UTC
This pull request is stale because it has been open for thirty days with no activity. Please update or respond to this comment if you're still interested in working on this.
@LucasHynes closing as stale. ping when ready to continue.
REF: deduplicate group cummin/max
State: closed

After #40584, may as well do this one too.

Labels:
name: Refactor
description: Internal refactoring of code
name: Groupby
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
any perf diffs? 

OT: we ought to consider just computing *both* at the same time (but this would require more processing because then we have to look for min/max and then dispatch, so prob not worth it)
> any perf diffs?
> 
> OT: we ought to consider just computing _both_ at the same time (but this would require more processing because then we have to look for min/max and then dispatch, so prob not worth it)

ASV's were unaffected. What do you mean by computing both at the same time? As in an enhancement to provide functionality for computing both min/max simultaneously?
> What do you mean by computing both at the same time? As in an enhancement to provide functionality for computing both min/max simultaneously?

yes, its more efficient to do this if you *know* that you want *both* min and max.
DOC: update guideline for installation development environment using pip
State: closed

- [x] closes #40595 
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
thanks @charlesdong1991
DOC: Update _shallow_copy docstring
State: closed

added extended param definition

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] Ensure all linting tests pass, see [here](https://pandas.pydata.org/pandas-docs/dev/development/contributing.html#code-standards) for how to run them
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
Hello @LucasHynes! 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 2021-03-23 21:34:31 UTC
i am not sure adding this doc-string is useful, thanks anyhow @LucasHynes
ENH: add `decimal` and `thousands` args to `Styler.format()`
State: closed

A PR for Europeans:

![Screen Shot 2021-03-23 at 21 40 19](https://user-images.githubusercontent.com/24256554/112216306-a1b90a00-8c21-11eb-9d2b-c281154b4b46.png)



Labels:
name: Styler
description: conditional formatting using DataFrame.style

Comments:
thanks @attack68 
can you open an issue (and a PR if you can!) to try to unify the string formatting for these  (and strings) at some point. thanks!