BrandonFors/pandas-github-issues huggingface dataset:
Bug: fix Series.str.split when 'regex=None' for series having 'pd.ArrowDtype(pa.string())' dtype
State: closed

According to the doc, if regex is None and pat length is not 1, treats pat as a regular expression.

- [x] closes #58321(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).
- [ ] 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: Strings
description: String extension data type and string data
name: Stale
name: Arrow
description: pyarrow functionality

Comments:
I've done some cleaning up and kept the original code. Could you have a further review? @jorisvandenbossche @WillAyd 
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.
ENH: pd.read_json ability to skip over first line when lines=True #58049 (with new docstrings and added code_checks)
State: closed

- [x] closes ENH: pd.read_json ability to skip over first line when lines=True https://github.com/pandas-dev/pandas/issues/58049
- [x] Added skiprows parameter - Callable List or Int - skips first X lines or all lines in a preset list
- [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:

Comments:
Thanks for the PR, but we require more discussion and support from a core team member in the enhancement issue before proceeding with a PR so closing this PR from now, but if there is more support for this feature in the future we can reopen this PR
ENH: pd.read_json ability to skip over first line when lines=True #58049
State: closed

- [ ] closes ENH: pd.read_json ability to skip over first line when lines=True #58049
- [x] Added skiprows parameter - Callable List or Int - skips first X lines or all lines in a preset list
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) Added Enhancement Feature for read_json functionality
- [ ] 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:
Per my comment in https://github.com/pandas-dev/pandas/pull/58414#issuecomment-2083321675, we would need more support in the enhancement issue before proceeding here
DEPR: nested parse_dates in read_csv
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: IO CSV
description: read_csv, to_csv
name: Clean

Comments:
Closing in favor of #58622
DEPR: to_datetime string behavior with unit
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: Clean

Comments:
Thanks @jbrockmendel
DOC: fix SA01 error for DatetimeIndex: day_of_year, is_leap_year, inferred_freq
State: closed

- [ ] xref #58066
- [ ] [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: Docs

Comments:
Thanks @KeiOshima
Fixed `pd.infer_freq` incompatible with `Series["timestamp[s][pyarrow]"]`
State: closed

- [x] closes #58403
- [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: Frequency
description: DateOffsets
name: Stale
name: Arrow
description: pyarrow functionality

Comments:
This is going to convert to a (non-pyarrow) DatetimeIndex under the hood, which will incur a silent perf penalty. Better to just tell users to convert themselves?
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.
DOC : Delete args and kwargs from pandas.Grouper
State: closed

- [ ] closes #58388 


Labels:
name: Stale

Comments:
@mroeschke I need your help here. After these changes 3 tests are failing 

```
FAILED pandas/tests/groupby/aggregate/test_aggregate.py::test_agg_multiple_functions_same_name - TypeError: Grouper.__new__() got multiple values for argument 'key'
FAILED pandas/tests/groupby/aggregate/test_aggregate.py::test_agg_multiple_functions_same_name_with_ohlc_present - TypeError: Grouper.__new__() got multiple values for argument 'key'
FAILED pandas/tests/groupby/test_timegrouper.py::TestGroupBy::test_groupby_with_timegrouper - TypeError: Grouper.__new__() got multiple values for argument 'key'
```

The error looks like this

```
>           result1 = df.resample("5D").sum()

pandas/tests/groupby/test_timegrouper.py:121: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pandas/core/generic.py:9011: in resample
    return get_resampler(
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

obj =                     Buyer  Quantity
Date                               
2013-09-01 13:00:00  Carl        18
2013-09-01...l         5
2013-10-03 10:00:00  Carl         1
2013-12-02 12:00:00   Joe         9
2013-09-02 14:00:00  Carl         3
kwds = {'closed': None, 'convention': 'start', 'freq': '5D', 'group_keys': False, ...}

    def get_resampler(obj: Series | DataFrame, **kwds) -> Resampler:
        """
        Create a TimeGrouper and return our resampler.
        """
>       tg = TimeGrouper(obj, **kwds)  # type: ignore[arg-type]
E       TypeError: Grouper.__new__() got multiple values for argument 'key'

pandas/core/resample.py:1864: TypeError
```

I am not able to debug where this extra `key` is getting passed. Can you please help me here?
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.
TST: Added match argument for most uses of tm.assert_produces_warning
State: closed

xref #58290
Places where I skipped match argument:
`computation/test_eval.py` and `frame/test_query_eval.py` as I couldn't get the tests to trigger the warning
`plotting/test_datetimelike.py` same reason as above.

The tests for internal things in `util` folder: 
`test_assert_produces_warning.py`, `test_deprecate_kwarg.py`, `test_deprecate_nonkeyword_arguments.py`, `test_deprecate.py`



other places I skipped because it would complicate the logic (I.E. `api/test_api.py`'s `test_depr` method.)


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Thanks @Aloqeely (agreed that it would be nice to enforce `match` for `assert_produces_warning`)
ENH: Add support for numpy 2's string dtype
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.

Just submitting this for CI purposes, nothing to review yet.

Labels:
name: Enhancement
name: Strings
description: String extension data type and string data
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.
Closing in favor of #58394.
Oh wait I can't, I guess the bot will get to it if Thomas doesn't :)
Extend eval test of standard functions to cover python engine.
State: closed

- [x] ~closes #xxxx (Replace xxxx with the GitHub issue number)~ (no issue created)
- [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~ (not applicable)
- [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.~ (not applicable)
- [x] ~Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.~ (not applicable)

IIUC the standard functions are (now?) supported in both engines and we can have tests for that.

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: expressions
description: pd.eval, query

Comments:
Thanks for the PR, is there an associated issue?
> Thanks for the PR, is there an associated issue?

None that I'm aware of. I sort of randomly noticed this when I was trying to understand how does `eval` work. I was thinking about submitting an issue first but given that this is purely test change it doesn't feel like a bug nor a feature. Anyway, given the nature of the change and the very small size I figured that the easiest way forward would be just submit the PR.

Let me know if I should do anything else (or that we just don't want to merge this for any reason -- if that is the case).
Thanks @domsmrz
BUG: identity checking NA in map incorrect
State: closed

- [x] closes #57390 
- [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).
- [N.A.] 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/v3.0.0.rst` file if fixing a bug or adding a new feature.

In bug #57390 Identity checking NA in map is incorrect because pd.NA are coerced to np.nan when evaluating a UDF.

This PR proposes to correct this problem in:
A) Avoiding cast in `object` for `map` input
B) Avoiding cast in `object` for `map` output

That's why `test_map` and `test_map_na_action_ignore` were modified in this way (we expect in this modified tests to keep `pd.NA` after a `map`)




Labels:

Comments:
@mroeschke: Hello, hope you're doing well, would it be possible to merge this PR or should I propose another approach ? 
Thanks in advance 
@mroeschke: for information I put this PR in Draft because I try to avoid a cast in object before calling `lib.map_infer` in `map_array`
pre-commit.ci autofix
For information, the idea in this new PR version is to be able to take into account into `lib.map_infer`:
- `BooleanArray`, `FloatingArray` and `IntegerArray` values without casting them into `object` before
- `pd.NA` value as valid value for a UDF

That's why I add a `mask` parameter to `lib.map_infer`.
@WillAyd : Hello Will, I would have a question: the check "Docstring validation, typing, and other manual pre-commit hooks" is in the state "cancelled" in the CI just after the following line:

`[90/152] Compiling C object pandas/_libs/join.cpython-310-x86_64-linux-gnu.so.p/meson-generated_pandas__libs_join.pyx.c.o`
`Error: The operation was canceled.`

I don't see any error (I try to rebuild it locally from scratch) and the other checks seems to be ok. Would you have an idea about what causing this problem ?
Thanks in advance
I agree that looks strange - just restarted the job. Let's see what happens
The error is clearer now, I will investigate. :-) Thanks a lot !
pre-commit.ci autofix
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.
CI: Fix npdev failures
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: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
Points to https://github.com/pandas-dev/pandas/issues/57739 probably needing solving sooner rather than later
Merging to get back to green
PERF: MultiIndex.memory_usage shouldn't trigger the index engine
State: closed

Ignore the index engine when it isn't already cached.

- [ ] 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.

### Reproducible Example

Calling `memory_usage()` can be unexpectedly slow when called on a big MultiIndex.

Using the main branch:
```python
In [3]: %time idx = pd.MultiIndex.from_product([np.arange(1000), np.arange(1000), np.arange(100)], names=["x0", "x1", "x2"])
CPU times: user 247 ms, sys: 170 ms, total: 417 ms
Wall time: 419 ms

In [4]: %time idx.memory_usage()
CPU times: user 2.91 s, sys: 4.09 s, total: 7 s
Wall time: 8.81 s
Out[4]: 500016953
```

Using this PR branch:
```python
In [3]: %time idx = pd.MultiIndex.from_product([np.arange(1000), np.arange(1000), np.arange(100)], names=["x0", "x1", "x2"])
CPU times: user 238 ms, sys: 148 ms, total: 386 ms
Wall time: 385 ms

In [4]: %time idx.memory_usage()
CPU times: user 112 µs, sys: 1e+03 ns, total: 113 µs
Wall time: 118 µs
Out[4]: 500016953
```

Side note: `index._engine.sizeof()` doesn't consider the content of `index._engine.values`. If it should, a separate issue can be opened. In the example above, the additional unreported used memory would be:
```python
In [8]: idx._engine.values
Out[8]: 
array([   262402,    262403,    262404, ..., 131331299, 131331300,
       131331301], dtype=uint64)

In [9]: idx._engine.values.shape
Out[9]: (100000000,)

In [15]: idx._engine.values.nbytes
Out[15]: 800000000

```


Labels:
name: Performance
description: Memory or execution speed performance
name: Index
description: Related to the Index class or subclasses

Comments:
Thanks @GianlucaFicarelli
DEPR: to_pytimedelta return Index[object]
State: closed

- [x] closes #57463 (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 `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Timedelta
description: Timedelta data type
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @Aloqeely
BUG: Add frequency to DatetimeArray/TimedeltaArray take 
State: closed

- [x] closes #58327 #57949
- [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.


<details> 
<summary> Disclaimer </summary>
I am required to add that the software is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. In no event shall the authors or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the software or the use or other dealings in the software.
</details> 


Labels:
name: Frequency
description: DateOffsets
name: MultiIndex

Comments:
Thanks @annika-rudolph (sorry for the delay here)
#58324
State: closed

- [x] closes #58324 (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).
- [ ] 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: Docs

Comments:
Thanks @Nrezhang
DOC: fixinf SA01 issue for DataFrame.to_feather
State: closed

- [ ] xref #58065 
- [ ] [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: Docs

Comments:
Thanks @KeiOshima
DOC: Fixing SA01 issues for DatetimeIndex: date and tz
State: closed

- [ ] xref #58066
- [ ] [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: Docs

Comments:
Thanks @KeiOshima