BrandonFors/pandas-github-issues huggingface dataset:
TST: Verify functioning of histtype argument (GH23992)
State: closed

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


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

Comments:
@mroeschke you added the testing label to the original issue. Could you maybe have a look whether this test meets the standards? Thanks!
Not as familiar with this part of the code base but tagged appropriately. 
@charlesdong1991 I have some issues when adding the type annotations, since the CI produces the error below. Locally this works since I have installed matplotlib in my env. How should I add the type annotation if matplotlib is not available on he machine, cause at the moment I am a bit stuck.
```
    from matplotlib.axes import Axes
E   ModuleNotFoundError: No module named 'matplotlib'
```
emm, maybe could you try this?

```python
from typing import TYPE_CHECKING
if TYPE_CHECKING:
    from matplotlib.axes import Axes
```
CI encountered "RuntimeError: can't start new thread". Would it be possible to restart the CI? Thanks!
@charlesdong1991 updated the code, merged master and CI is on green. Could you review it again?
@charlesdong1991 over to you, merge when good
Sorry I saw I forgot to rename function `_check_filling`to `_check_patches_all_filled`. Did it now and pushed it
OK, everything is done now :)
TST/CLN: relocate tests for PyTables roundtrip of timezone-aware Index
State: closed

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


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO HDF5
description: read_hdf, HDFStore
name: Timezones
description: Timezone data dtype

Comments:
Green
Thanks @arw2019
TYP: mostly io, plotting
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

cc @simonjayhawkins can i get your thoughts on two remaining mypy complaints

```
pandas/io/excel/_base.py:795: error: "Callable[[ExcelWriter], Tuple[str, ...]]" has no attribute "__iter__" (not iterable)  [attr-defined]
pandas/io/stata.py:892: error: unused 'type: ignore' comment
```

The excel one is because it doesn't recognize 

```
@property
@abstractmethod
def supported_extensions(self) -> Tuple[str, ...]:
```

as returning `Tuple[str, ...]`.  I expect if that were resolved it would still complain bc subclasses just pin the tuple as a class attribute instead of a property (easy to make a property, but much more verbose which im not wild about)

The stata unused type:ignore becomes used once we remove stata from the setup.cfg exclusion.  The only working way I've found to make mypy accept `TYPE_MAP: List[Union[int, str]] = list(range(251)) + list("abcd")` is with

```
TYPE_MAP: List[Union[int, str]] = cast(List[Union[int, str]], list(range(251))) + list("abcd")
```

which i find much less clear than the `# type:ignore`d version.

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

Comments:
punted on issues in the OP, so this should be ready
> cc @simonjayhawkins can i get your thoughts on two remaining mypy complaints
> 
> ```
> pandas/io/excel/_base.py:795: error: "Callable[[ExcelWriter], Tuple[str, ...]]" has no attribute "__iter__" (not iterable)  [attr-defined]
> ```

see https://github.com/pandas-dev/pandas/pull/28339#discussion_r339136692


Makes sense, thanks.  Are you OK with the solution here?
> Makes sense, thanks. Are you OK with the solution here?

from the previous discussion, https://github.com/pandas-dev/pandas/pull/28339#discussion_r339180390

> Sure you could just remove the abstract requirement altogether for supported_extensions and make it a class variable, but that would lose the abstract nature of it.

maybe `type: ignore` for now and reference the mypy issue, https://github.com/python/mypy/issues/7760

The crux of the issue seems to be https://github.com/python/mypy/issues/7760#issuecomment-544473268

> I guess my real issue then is Python language's lack of notation for abstract class attributes.

The code does work. so we shouldn't really need to change it.
troubleshoot CI
State: closed

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


Labels:
name: CI
description: Continuous Integration

Comments:
just merged a patch for this
so can close this?
i think so, master is passing now (or at least last couple of PRs) by https://github.com/pandas-dev/pandas/pull/37048
CI clean pre-commit: upgrade isort, use correct file types in flake8
State: closed

A few things here:

- updating isort version
- updating to use `types` instead of `files` (see https://github.com/pre-commit/pre-commit/issues/1436#issuecomment-624219819 and https://github.com/PyCQA/isort/pull/1549#issuecomment-706621474)
- removing `exclude: ^pandas/__init__\.py$|^pandas/core/api\.py$` as it's no longer necessary
- replacing `files: \.(pyx|pxd)$` with `types: [cython]`:

  ```bash
  $ identify-cli pandas/_libs/groupby.pyx
  ["cython", "file", "non-executable", "text"]
  $ identify-cli pandas/_libs/lib.pxd
  ["cython", "file", "non-executable", "text"]
  ```

- replacing the name `flake8-pxd` with `flake8 (cython template)`, as that hook wasn't actually checking `.pxd` files (the `flake8-pyx` one was)

Labels:
name: CI
description: Continuous Integration
name: Code Style
description: Code style, linting, code_checks

Comments:
Nice!  Great work with the CI/code_check improvements
thanks @MarcoGorelli 
> Nice! Great work with the CI/code_check improvements

Thanks, much appreciated
REF: use OpsMixin in EAs
State: closed

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


Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
lgtm but wouldn't hurt to merge master
rebased+green
TST: Fix failing test from #37027
State: closed

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

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

Comments:
Is it possible to update the error messages to make CI pass rather than reverting entirely?
@dsaxton updated. all checks passed. could i get the `hacktoberfest-accepted` label for this PR?
thanks much @hongshaoyang
DOC: Add whatsnew for #36727
State: closed

xref #36727 

Was not quick enough to add a whatsnew with the PR when 1.1.4 whatsnew was merged.

Labels:
name: Docs

Comments:
Merged master to fix mypy problems
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.1.x
$ git pull
```

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

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

```
$ git commit -am 'Backport PR #37046: DOC: Add whatsnew for #36727'
```

4. Push to a named branch :

```
git push YOURFORK 1.1.x:auto-backport-of-pr-37046-on-1.1.x
```

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

> "Backport PR #37046 on branch 1.1.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).
REF/TYP: use OpsMixin for DataFrame
State: closed

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

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

Comments:
wouldn't hurt to merge master
updated+green
ENH: Implement sem for Rolling and Expanding
State: closed

- [x] closes #26476
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

I added sem to the Rolling and Expanding API as mentioned in the issue linked above.

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

Comments:
Thanks. Could you also add tests for `groupby().rolling().sem()` and `groupby().expanding().sem()`?
Done, count also counts for the grouping column. Is this the expected behavior?
Could you give a small example for the count behavior?
The snippet

```
df = pd.DataFrame([["a", 1], ["a", 2], ["b", 1], ["b", 2], ["b", 3]], columns=["a", "b"])
result = df.groupby("a").rolling(2, min_periods=1).count()
print(result)
```

returns 

```
       a    b
a            
a 0  1.0  1.0
  1  2.0  2.0
b 2  1.0  1.0
  3  2.0  2.0
  4  2.0  2.0
```

I would not have expected ``a`` to be a column and part of the index.
Thanks, I think that's a known bug https://github.com/pandas-dev/pandas/issues/32262
thanks @phofl very nice
DOC: Add summary to interpolate
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

The interpolate method was missing a short summary. I hope this addition is reasonable. Happy to change it with feedback.

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

Comments:
Thanks @erictleung
BUG:  set value with iloc and list like indexer
State: closed

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


Labels:

Comments:
> what issue is this closing? this would need a test; i am not sure why you think this needs changing.

It's for #36741 , might not be the place to start, that's why its draft
@jbrockmendel this seems to work, but when the dtype of the new values changes this will return the wrong dtype. For example (see example below), although the values will be correct. So it will solve the problem of the reference issue.
```python
df_orig = DataFrame(
    [["1", "2", "3", ".4", 5, 6.0, "foo"]], columns=list("ABCDEFG")
)

df = df_orig.copy()
df.iloc[:, 0:2] = df.iloc[:, 0:2].astype(np.int64)
expected = DataFrame(
    [[1, 2, "3", ".4", 5, 6.0, "foo"]], columns=list("ABCDEFG")
)
tm.assert_frame_equal(df, expected)
```

Any ideas where I might look?
supersed by #37432
CLN: remove unnecessary DatetimeTZBlock.fillna
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

and no need to have TimeDeltaBlock inherit from IntBlock

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Internals
description: Related to non-user accessible pandas implementation
name: Clean

Comments:
very nice
CI: move py39 build to conda #33948
State: closed

- [x] closes #33948



Labels:
name: CI
description: Continuous Integration

Comments:
very nice ping on green-ish (some builds are failing for unrelated reasons)
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.
i think this could work now, @fangchenli can you merge master and let's see 
very nice @fangchenli 
@meeseeksdev backport 1.1.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.1.x
$ git pull
```

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

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

```
$ git commit -am 'Backport PR #37039: CI: move py39 build to conda #33948'
```

4. Push to a named branch :

```
git push YOURFORK 1.1.x:auto-backport-of-pr-37039-on-1.1.x
```

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

> "Backport PR #37039 on branch 1.1.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).
REF/TYP: define Index methods non-dynamically
State: closed

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


Labels:
name: Index
description: Related to the Index class or subclasses
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
very nice
updated+green
Fixed metadata propagation in DataFrame.__getitem__
State: closed

xref #28283

Labels:
name: metadata
description: _metadata, .attrs
name: Stale

Comments:
can you merge master (i think should be good then)
There's a deeper problem here. `NDFrame.__finalize__` iterates through `self._metadata` copying items from other to new. When we have a method with a type like `f(self: DataFrame, ...) -> Series`, we end up trying to copy `other.name` to the result. That causes problem with a DataFrame with a `name` column:

```python
In [10]: other = pd.DataFrame({"name": [1, 2]})

In [11]: self.__finalize__(other)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-11-0a67385a6694> in <module>
----> 1 self.__finalize__(other)

~/Envs/dask-dev/lib/python3.8/site-packages/pandas/core/generic.py in __finalize__(self, other, method, **kwargs)
   5115             for name in self._metadata:
   5116                 assert isinstance(name, str)
-> 5117                 object.__setattr__(self, name, getattr(other, name, None))
   5118         return self
   5119

~/Envs/dask-dev/lib/python3.8/site-packages/pandas/core/series.py in name(self, value)
    493     def name(self, value: Label) -> None:
    494         if not is_hashable(value):
--> 495             raise TypeError("Series.name must be a hashable type")
    496         object.__setattr__(self, "_name", value)
    497

TypeError: Series.name must be a hashable type
```

I'll think a bit about this.
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.
`df.eval(...)` now propagates attrs with `engine="python"`, but `engine="numexpr"` doesn't. We can fix numexpr as a followup.
thanks @TomAugspurger
API: reimplement FixedWindowIndexer.get_window_bounds
State: closed

- [x] closes #36040
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

This PR replaces [36132](https://github.com/pandas-dev/pandas/pull/36132) following @mroeschke's [36567](https://github.com/pandas-dev/pandas/pull/36567).

Originally, my PR was to fix Issue [36040](https://github.com/pandas-dev/pandas/issues/36040). But it appears that Matthew's PR already fixed it! Nonetheless, I still included two things from my previous PR:

1. I added tests to cover the bug outlined in Issue [36040](https://github.com/pandas-dev/pandas/issues/36040).
2. I reimplemented FixedWindowIndexer.get_window_bounds in a way that I believe if a lot more intuitive and simple. Please lmk if you disagree, in which case I could remove this from the PR.

I don't believe any functionality was altered by this PR so I did not include a whatsnew entry

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

Comments:
cc @mroeschke 
Could you also add a whatsnew entry in 1.2?
Looks like there were some failures, but I do not believe those were caused by this PR
> Could you also add a whatsnew entry in 1.2?

@mroeschke I added a whatsnew entry about the reimplementation and linked Issue [36040](https://github.com/pandas-dev/pandas/issues/36040), even though it's not technically fixing that issue (the issue was already fixed by your PR). Please lmk if this is what you intended I add, or if you were looking for something else.
thanks @justinessert
REGR: Fix casting of None to str during astype
State: closed

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


Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: Strings
description: String extension data type and string data

Comments:
@meeseeksdev backport 1.1.x
CLN: Simplify aggregation.aggregate
State: closed

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


Labels:
name: Clean
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
/azp run
<samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>
nice, thanks @rhshadrach keep em coming
DOC: Group relevant df.mask/df.where examples together
State: closed

df.mask() and df.where() are complementary and so they share docs, see [here](https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.mask.html). I grouped related examples together.

- [x] Close #25187
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Labels:
name: Docs

Comments:
thanks @hongshaoyang 
Thanks @jreback, may I get this PR labelled as `hacktoberfest-accepted`?

See #36837 and [here](https://hacktoberfest.digitalocean.com/hacktoberfest-update).
DOC: Clarify display.precision
State: closed

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


Labels:
name: Docs
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
Thanks @jreback, @rhshadrach, updated. may I get this PR labelled as `hacktoberfest-accepted`?

See #36837 and [here](https://hacktoberfest.digitalocean.com/hacktoberfest-update).
all checks passing. 
thanks @hongshaoyang
DOC: Improve what the `axis=` kwarg does for generic methods
State: closed

### [`axis=0` or `axis=1`, which is it?](https://github.com/pandas-dev/pandas/issues/29203#issue-511923432)
Opening a PR to discuss #29203 on what it means to do `df.sum(axis=0)` versus `df.sum(axis=1)`. The docs does not make it intuitively clear to the user. I propose a simple change where **"summing across`axis=0`"** makes it clear that you're summing across indexes (i.e. **column sums**).


- [x] Closes #29203
- [x] Passes pytest
- [x] Passes `black pandas`
- [x] Passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Labels:
name: Docs
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

Comments:
Thank you @arw2019 for the review! I agree that "over" is clearer, and have changed accordingly.
Thanks for the approval! May I get this PR labelled as `hacktoberfest-accepted`?

See #36837 and [here](https://hacktoberfest.digitalocean.com/hacktoberfest-update).
can you merge master (and ping on green), we just moved a lot of this around.
all checks passing @jreback 
thanks @hongshaoyang
TST: insert 'match' to bare pytest raises in pandas/tests/tools/test_…
State: closed

- [ ] ref https://github.com/pandas-dev/pandas/issues/30999
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Hi,
can anyone add this label hacktoberfest-accepted
thanks @krajatcl 
this PR is causing datetime tests to fail

https://dev.azure.com/pandas-dev/pandas/_build?definitionId=1&_a=summary
ok can u revert the commit in a new PR?
Done: #37048
TST: insert 'match' to bare pytest raises in pandas/tests/test_flags.py
State: closed

- [ ] ref https://github.com/pandas-dev/pandas/issues/30999
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Hi can you add this label
hacktoberfest-accepted
thanks @krajatcl
DOC: Clarified pandas_version in to_json
State: closed

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


Labels:
name: Docs
name: IO JSON
description: read_json, to_json, json_normalize

Comments:
Hello @tnwei! 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-10-12 15:07:54 UTC
Thanks @arw2019 for the review, edited wording as suggested
thanks @tnwei 
Thanks for merging @jreback . Hacktoberfest brought me here, would you mind adding the `hacktoberfest-accepted` label to this PR? TQVM!
> Thanks for merging @jreback . Hacktoberfest brought me here, would you mind adding the `hacktoberfest-accepted` label to this PR? TQVM!

no problem
TYP: core/dtypes/cast.py
State: closed

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


Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
cc @simonjayhawkins 
@simonjayhawkins i fyou can have a quick look and merge if good
Thanks @arw2019 lgtm one more comment https://github.com/pandas-dev/pandas/pull/37024#discussion_r503495620 ping when green
thanks @arw2019
CLN: collected cleanups, warning suppression in tests
State: closed

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


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

Comments:
looks fine, ping on green
ping