BrandonFors/pandas-github-issues huggingface dataset:
BUG: Groupby not keeping object dtype when infer string is set
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: Bug
name: Groupby
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Strings
description: String extension data type and string data
name: Arrow
description: pyarrow functionality

Comments:
Is this a regression with no related issue?
I am working on a build that uses arrow backed strings by default, but this turns up dozens of bugs related to either the new string dtype we added for 2.1 or arrow strings more generally, not opening issues since I am fixing them when I come across them
Thanks @phofl
BUG: Groupby not keeping string dtype for empty objects
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.

cc @rhshadrach 

Labels:
name: Groupby
name: Strings
description: String extension data type and string data

Comments:
thanks @phofl.
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.1.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 8afd868106dec889df89e3abed36af09bb7ddf8c
```

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

```
git commit -am 'Backport PR #55619: BUG: Groupby not keeping string dtype for empty objects'
```

4. Push to a named branch:

```
git push YOURFORK 2.1.x:auto-backport-of-pr-55619-on-2.1.x
```

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

> "Backport PR #55619 on branch 2.1.x (BUG: Groupby not keeping string dtype for empty objects)"

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).
REF: implement ParseState
State: closed

In the near future, the state being tracked in array_to_datetime and array_strptime will include a resolution (xref #55564).  This implements a ParseState object to de-duplicate tracking, validation, and updating.

Labels:
name: Datetime
description: Datetime data dtype
name: Timezones
description: Timezone data dtype

Comments:
Thanks @jbrockmendel
REF: Misplaced DatetimeIndex tests
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: Testing
description: pandas testing functions or related to the test suite

Comments:
Thanks @jbrockmendel
BUG: inferred_freq with non-nano
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: Frequency
description: DateOffsets
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
BUG: BusinessDay addition 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: Frequency
description: DateOffsets
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
REF: initialize Series._name in _from_mgr to return valid Series object
State: closed

Currently `Series._from_mgr` doesn't return a fully initialized Series object, because it misses the `_name` attribute (without this, several kinds of operations fail on the object). 
While `_from_mgr` is not a user-facing method, I think also from a developer perspective, it's nicer if it returns a proper Series, for example for during debugging, and for not having to think about setting `_name` after using it (as we are currently doing).

Labels:
name: Internals
description: Related to non-user accessible pandas implementation
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
Looks like this PR has gone stale and needs a rebase so closing to clear the queue, but feel free to reopen when you have time to circle back
CI: Have NumpyDev build only test nightly numpy
State: closed

Since scipy is an optional dependency and is only use sparsely within the pandas API, I don't think it's entirely necessary to test its nightly


Labels:
name: CI
description: Continuous Integration

Comments:
im fine with this; is this needed to get the CI back to green?
It conveniently gets the CI back to green. The main is issue is that scipy has deprecated `np.core` usage and will need to be fixed upstreamed
Going to merge to get the CI back to green
BUG: DateOffset addition with non-nano
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: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Frequency
description: DateOffsets
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
BLD: Allow building with NumPy nightlies and use it for nightlies
State: closed

I am not sure that this is uncontested that this is a good version pin change.  I also took the liberty of removing the current use of oldest-support-numpy, since Python 3.9 means that you should normally always get 1.25 anyway and that should work for any NumPy version.

The `<=2.0.0.dev0` is a way to explicitly allow NumPy nightly wheels, although of course you need the additional URL to use it. In a release version, it might be nicer to not have it, but it also should not really hurt since the you are unlikely to have the NumPy dev wheels available unless you really want them.

(Not sure how to best test that the changes work as is.)

---

@lithomas1 I suppose you are the one to discuss this?  I am not sure that others will agree that changing the version pin as I did is a viable approach, yet.
Maybe there is some reason why removing oldest-support-numpy seems terrible also?!  To me it seems like it should be safe, assuming it works.

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

Comments:
Maybe the better path is to just install NumPy explicitly.  cibuildwheel shouldn't use build isolation by default (I think).  So adding an explicit install to the pre-build step should work.  (And no need for changing the version pin.)
thanks @seberg.

Let's put this in as is for now. I'll fiddle with it a little more if it ends up breaking something.
ENH: functions filter_columns and filter_rows created
State: closed

- [ ] closes #55289
- [ ] [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).
- [x] 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.

Basically those 2 functions do the same as filter() in pandas/core/generic.py, but separated to deal with either columns or rows. Also hopefully it's easier without the need to specify the 'axis' and with the 'items' variable being replaced by 'colnames' and 'rownames'.

Is this close to what you expected @speed650? Your idea to have a list of boolean expressions (Filter_Rows( [ ('name'==bob), ( 'age' > 20) ])) be accepted by the functions sounded great, but I couldn't figure out how to do it without making them hard to use, defeating the purpose I suppose.


Labels:

Comments:
Thanks for the PR but as mentioned consensus is needed in the issue before proceeding with a PR so closing for now but happy to reopen if there's agreement to move forward here
Ok, I'll be checking from time to time to see if a consensus has been reached, thank you.
[Documentation] Added another example in `df.clip` documentation.
State: closed

df.clip takes lower and upper threshholds as inputs, and both of these can be `float or array-like, default None` type. 

I am aware of an example in doc which Clips specific lower and upper thresholds per column element. 

But it would be also nice to have example clipping is happening per column with specific lower and upper threshhold. 

Labels:
name: Docs

Comments:
Thanks @abhi-glitchhg
REGR: Groupby methods not supporting numba raising TypeError when the…
State: closed

… global option is set

- [ ] closes #55520 (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: Groupby
name: Regression
description: Functionality that used to work in a prior pandas version
name: numba
description: numba-accelerated operations

Comments:
> Looks good. Curious if groupby transform has this same issue?

Nope, we don't have numba support implemented for transforms.
Thanks @lithomas1
BUG: Week.__add__ with non-nano
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.

The shift_months test fix is unrelated, just discovered at the same time.

Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Frequency
description: DateOffsets
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
BUG: conversion a JSON field descriptor into pandas type for deprecated offsets frequency 'M'
State: closed

xref #52064

when converting a JSON field descriptor into its corresponding pandas type we don't check if we have deprecated for offsets frequency "M".
corrected the definition of `convert_json_field_to_pandas_type`, added a test.

Labels:
name: IO JSON
description: read_json, to_json, json_normalize
name: Frequency
description: DateOffsets

Comments:
Thank you @MarcoGorelli for reviewing this PR.
BUG/PERF: merge_asof with multiple "by" keys
State: closed

- [x] closes #43541
- [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.2.0.rst` file if fixing a bug or adding a new feature.

```
> asv continuous -f 1.1 upstream/main merge-as-of-multi-by -b join_merge.MergeAsof
```

```
.       before           after         ratio
     [59d4e841]       [bfe776d7]
     <main>           <merge-as-of-multi-by>
-      1.66±0.03s         602±50ms     0.36  join_merge.MergeAsof.time_multiby('nearest', None)
-      1.56±0.03s         560±40ms     0.36  join_merge.MergeAsof.time_multiby('nearest', 5)
-      1.48±0.03s         449±50ms     0.30  join_merge.MergeAsof.time_multiby('forward', None)
-      1.60±0.07s         472±30ms     0.29  join_merge.MergeAsof.time_multiby('forward', 5)
-      1.25±0.03s         314±10ms     0.25  join_merge.MergeAsof.time_multiby('backward', None)
-       1.35±0.1s         295±10ms     0.22  join_merge.MergeAsof.time_multiby('backward', 5)
```

Labels:
name: Bug
name: Performance
description: Memory or execution speed performance
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @lukemanley
DOC: Include_lowest parameter docs modification
State: closed

- [x] closes #23164  (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.
- [x] Added an entry in the latest `pandas/core/reshape/tile.py` file - include_lowest parameter in the pd.cut() function was exhibiting a behavior that was not previously documented. All cases of this issue are taken care of in the documentation


Labels:
name: Stale

Comments:
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
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.
Series.pow when right operand is missing value
State: closed

- [x] closes #55512 (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: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations

Comments:
Thanks @rohanjain101
Floordiv fix for pyarrow dtypes
State: closed

- [x] closes #55561(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: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Arrow
description: pyarrow functionality

Comments:
Thanks @rohanjain101
added assert
State: closed

- [x] closes #55557 
- [x] [Tests added and passed]
- [ ] All [code checks passed]
- [x] Added [type annotations] 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: Testing
description: pandas testing functions or related to the test suite

Comments:
Thanks @jayendra-patil33
BUG: DataFrame.update doesn't preserve dtypes
State: closed

Preserve dtype when updating from dataframe whose NA values don't affect original.

I don't know the best place to put the test case in the tests/frame or the tests/dtype directory.

- [x] closes #55509
- [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.


Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Stale

Comments:
I found pandas/tests/frame/methods/test_update.py and will update test case there.
This pull request is stale because it has been open for thirty days with no activity. Please [update](https://pandas.pydata.org/pandas-docs/stable/development/contributing.html#updating-your-pull-request) and respond to this comment if you're still interested in working on this.
My changes obsoleted by https://github.com/pandas-dev/pandas/pull/55634
BUG: Don't clean docs and open browser in code_checks
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.

Ref: https://github.com/pandas-dev/pandas/pull/46806#issuecomment-1152922326

In regards to not cleaning the docs at the end, when I'm wrapping up a PR, I'm typically building documentation and running code_checks. Right now these are at odds with each other since the docs are cleared in code_checks. Can remove if there is opposition to this change.

Labels:
name: Bug
name: CI
description: Continuous Integration

Comments:
Nice! I think this is a nice cleanup. Thanks @rhshadrach
DOC: Remove explicit paths from references
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.

Doing this will make the diffs slightly smaller for #27522, and I think should be done in any case.

Labels:
name: Docs
name: Clean

Comments:
Thanks @rhshadrach