BrandonFors/pandas-github-issues huggingface dataset:
BUG: pyarrow mean can overflows on timestamp[ns][pyarrow] #52464
State: closed

BUG: pyarrow mean can overflows on timestamp[ns][pyarrow] #52464

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Bug
name: Arrow
description: pyarrow functionality

Comments:
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
BUG: Adding a columns to a Frame with RangeIndex columns using a non-scalar key
State: closed

- [X] closes #52652
- [X] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [X] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [X] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Regression
description: Functionality that used to work in a prior pandas version

Comments:
Thanks for taking a look. Could you label regression fixes immediately as 2.0.x while opening? Makes prioritising PR reviews easier
thx @topper-123
BUG: convert_dtypes ingoring convert keywords for pyarrow backend
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

cc @mroeschke 
This seems buggy, we should still respect the keywords

Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Arrow
description: pyarrow functionality

Comments:
```
mypy.....................................................................Failed
- hook id: mypy
- duration: 163.23s
- exit code: 1

pandas/core/dtypes/cast.py:1110: error: Item "str" of "Union[str, Any, dtype[Any], ExtensionDtype]" has no attribute "kind"  [union-attr]
pandas/core/dtypes/cast.py:1111: error: Item "str" of "Union[str, Any, dtype[Any], ExtensionDtype]" has no attribute "kind"  [union-attr]
pandas/core/dtypes/cast.py:1112: error: Item "str" of "Union[str, Any, dtype[Any], ExtensionDtype]" has no attribute "kind"  [union-attr]
pandas/core/dtypes/cast.py:1115: error: Item "str" of "Union[str, Any, dtype[Any], ExtensionDtype]" has no attribute "kind"  [union-attr]
Found 4 errors in 1 file (checked 1417 source files)
```
thx fixed
Merge conflict otherwise looks good
Bug can't compute cummin/cummax on ordered categorical #52335
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `pandas/core/arrays/categorical.py` file if fixing a bug or adding a new feature.


Labels:
name: Categorical
description: Categorical Data Type
name: Transformations
description: e.g. cumsum, diff, rank

Comments:
Thanks for the pull request, but it appears to have gone stale. If interested in continuing, please merge in the main branch, address any review comments and/or failing tests, and we can reopen.
BUG: overriden methods of subclasses of Styler are not called during …
State: closed

…rendering #52728

BUG: overriden methods of subclasses of Styler are not called during rendering #52728

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Please don't open a PR for every change you have to do on this branch. You can simply push to this branch and the ci will rerun
The underlying issue was labelled as "good first issue" and had already been taken and assigned to @nicklausroach. It is not respectful towards the community to ignore that and push your own PR without commenting in the issue.

If he does not submit a PR within a few days it is possible to ask him if he would not mind reassigning it to you.

Sorry, I'm a new user who's just testing on these. Since it didn't pass the test. I'll stop there.
You can use the search function for issues with 'label:"good first issue"', and this will usually yield some good results that are not taken which are worthwhile trying.
Closing then
Adjust unxfail condition for nat test
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: CI
description: Continuous Integration
name: Dependencies
description: Required and optional dependencies

Comments:
merging to ensure that ci on 2.0.1 will be green as well for release
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 2.0.x
git pull
```

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

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

```
git commit -am 'Backport PR #52867: Adjust unxfail condition for nat test'
```

4. Push to a named branch:

```
git push YOURFORK 2.0.x:auto-backport-of-pr-52867-on-2.0.x
```

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

> "Backport PR #52867 on branch 2.0.x (Adjust unxfail condition for nat test)"

And apply the correct labels and milestones.

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

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
Added Spaces between Code
State: closed

Added spaces between code to make it look clean.

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
These sections belong together. Please don't open such PRs if there isn't anything obviously wrong
BUG: pd.array with non-nano
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Not clear to me what the point of this test is

On Mon, Apr 24, 2023 at 11:30 AM Matthew Roeschke ***@***.***>
wrote:

> ***@***.**** commented on this pull request.
> ------------------------------
>
> In pandas/tests/arrays/test_array.py
> <https://github.com/pandas-dev/pandas/pull/52859#discussion_r1175648010>:
>
> > @@ -404,25 +412,6 @@ def test_array_unboxes(index_or_series):
>      tm.assert_equal(result, expected)
>
>
> ***@***.***
> -def registry_without_decimal():
> -    """Fixture yielding 'registry' with no DecimalDtype entries"""
> -    idx = registry.dtypes.index(DecimalDtype)
> -    registry.dtypes.pop(idx)
> -    yield
> -    registry.dtypes.append(DecimalDtype)
> -
> -
> -def test_array_not_registered(registry_without_decimal):
>
> Shouldn't we still have a related test like this?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/52859#pullrequestreview-1398585978>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AB5UM6HA6NEPKPI5PFNTFMDXC3BC7ANCNFSM6AAAAAAXIFXGBM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>

Thanks @jbrockmendel
Issue 52827: Added xfail for pyarrow int64 rounding
State: closed

- [ ] closes #52827 
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] ~~ Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions. ~~
- [ ]  ~~Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.~~


Labels:

Comments:
Hi @phofl, can I ask for a second review ?
Feel free to reopen when you have time to circle back here
Modified the doc string of value_counts for DataFrame and series when sort arg is set to false
State: closed

 [ ✓] closes #51420 

Added the explanation of 'sort' keyword for pandas.DataFrame.value_counts and pandas.Series.value_counts. When 'sort' is set to False, _value_counts_ method sorts the _dataframe_ by index. For _series,_ it preserves the order of the data.

The doctest fails due to missing explanation of the return value in value_counts. As it is not related to this issue, it should be handled separately.


Labels:
name: Docs
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
Thx @VomV
TST: cast string to complex
State: closed

- [X] closes #4895
- [X] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [X] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Should I add for `Series` as well? if yes then in the same function?

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

Comments:
thx @srkds 

don't think we need a test for series
Thanks @phofl for the review 😀.
Backport PR #52850 on branch 2.0.x (REGR: SeriesGroupBy.agg with multiple categoricals, as_index=False, and a list fails)
State: closed

…nd a list fails (#52850)



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

Comments:
cc @rhshadrach can you take a look?
Odd that the deprecation of observed got in here, but that's only been deprecated in 2.1.
TST/CLN: Prepare moving tests out of groupby/test_allowlist
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Follow up to #52537; makes it so that we can cut-and-paste these tests to appropriate files. Next PR will be moving these.

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

Comments:
thx @rhshadrach
REGR: SeriesGroupBy.agg with multiple categoricals, as_index=False, and a list fails
State: closed

- [x] closes #52760 (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Bug
name: Groupby
name: Regression
description: Functionality that used to work in a prior pandas version
name: Categorical
description: Categorical Data Type
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
thx @rhshadrach 
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 2.0.x
git pull
```

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

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

```
git commit -am 'Backport PR #52850: REGR: SeriesGroupBy.agg with multiple categoricals, as_index=False, and a list fails'
```

4. Push to a named branch:

```
git push YOURFORK 2.0.x:auto-backport-of-pr-52850-on-2.0.x
```

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

> "Backport PR #52850 on branch 2.0.x (REGR: SeriesGroupBy.agg with multiple categoricals, as_index=False, and a list fails)"

And apply the correct labels and milestones.

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

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
BUG: pyarrow duration arrays constructed from data containing NaT can overflow
State: closed

- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/v2.0.1.rst` file if fixing a bug or adding a new feature.

The underlying bug is upstream: https://github.com/apache/arrow/issues/35088

Fixes the following:
```
import pandas as pd
import pyarrow as pa

data_ts = pd.to_datetime([1, None])
data_td = pd.to_timedelta([1, None])

ser_ts = pd.Series(data_ts, dtype=pd.ArrowDtype(pa.timestamp("ns")))
ser_td = pd.Series(data_td, dtype=pd.ArrowDtype(pa.duration("ns")))

result = ser_ts + ser_td  # ArrowInvalid: overflow
```

Labels:
name: Bug
name: Upstream issue
description: Issue related to pandas dependency
name: Arrow
description: pyarrow functionality

Comments:
thx @lukemanley 
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 2.0.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 4539f3eff40f0889b1e089c68cfe2a0b034d7ec9
```

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

```
git commit -am 'Backport PR #52843: BUG: pyarrow duration arrays constructed from data containing NaT can overflow'
```

4. Push to a named branch:

```
git push YOURFORK 2.0.x:auto-backport-of-pr-52843-on-2.0.x
```

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

> "Backport PR #52843 on branch 2.0.x (BUG: pyarrow duration arrays constructed from data containing NaT can overflow)"

And apply the correct labels and milestones.

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

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
BUG: dt.round with equal/higher freq resolution would not noop
State: closed

- [x] closes #52761 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
thx @mroeschke
BUG: FloatingArray.__contains__(nan)
State: closed

- [ ] closes #xxxx (Replace xxxx with the GitHub issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

More targeted version of #51378

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

Comments:
```
 mypy.....................................................................Failed
- hook id: mypy
- duration: 140.36s
- exit code: 1

pandas/core/arrays/masked.py:245: error: Incompatible return value type (got "Union[bool, bool_]", expected "bool")  [return-value]
Found 1 error in 1 file (checked 1420 source files)
```
Thanks @jbrockmendel
DEPR: Series logical ops with different index coercing to bool
State: closed

- [x] closes #52500 (Replace xxxx with the GitHub issue number)
- [x] closes #52538 (Replace xxxx with the GitHub issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Deprecate
description: Functionality to remove in pandas

Comments:
I for sure prefer this behavior, but its definitely intentional so not sure we can call it a bugfix.

The approach i've been kicking around (with little success) for non-aligned cases is to do a .align(join="inner") before operating, kind of like how we do _arith_method_with_reindex

Update: also could just deprecate automatic alignment for logical ops
Fair point. I went ahead and deprecated this behavior instead
Going to merge, but can address any followups