BrandonFors/pandas-github-issues huggingface dataset:
DOC: Update docstring errors for pandas.DataFrame.mean, pandas.DataFr…
State: closed

Updates the docstring errors for the methods mentioned above. 
![image](https://github.com/pandas-dev/pandas/assets/144747028/34b36412-d63f-49d3-9c20-1205165c9d95)
![image](https://github.com/pandas-dev/pandas/assets/144747028/927601b7-098c-4ea8-95cc-c28c4d630173)
![image](https://github.com/pandas-dev/pandas/assets/144747028/3acb9d60-b2e8-47e9-8f91-1a3af97184dd)
![image](https://github.com/pandas-dev/pandas/assets/144747028/6731d4a5-e83d-4f1b-a80a-421305c75984)


Labels:

Comments:
Thanks for the PR! I am getting different results when running the validation script. All the additions you added are not actually missing (not sure why you're getting these results)

Going to close because the existing errors are actually correct, but it would be really appreciated if you can open a PR to update the docstrings to fix the errors!
DOC: More doc fix for dtype_backend
State: closed

- [ ] Fix all changed in #54104, following #59021 
- [ ] Closes #59332
- [ ] [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
name: IO Data
description: IO issues that don't fit into a more specific label

Comments:
Honestly, I've lost track of the current PR, but I'll do my utmost to address all comments. If further changes are needed, I'll make them promptly.
Thanks @luke396!
Fix insertion of None value in MultiIndex
State: closed

- [x] closes #59003 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests)
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file if fixing a bug or adding a new feature.


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

Comments:
Thanks @chaoyihu
ENH: Fix Python 3.13 test failures & enable CI
State: closed

x-ref #58734

- [ ] 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

Comments:
@lithomas1 `python-dev` CI seems to be passing on all platforms. `Pyarrow Nightly` and `Unit Tests / Linux-32-bit` are failing but it appears that they also fail on main. Is this good to go?
I'm marking as ready for review, since I don't think there's any more outstanding issues for 3.13.
Thanks @lysnikolaou and @lithomas1 
@meeseeksdev backport 2.2.x
Owee, I'm MrMeeseeks, Look at me.

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

1. Checkout backport branch and update it.

```
git checkout 2.2.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 39a3bf355574df76df44cededffac96fddb48a04
```

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

```
git commit -am 'Backport PR #59065: ENH: Fix Python 3.13 test failures & enable CI'
```

4. Push to a named branch:

```
git push YOURFORK 2.2.x:auto-backport-of-pr-59065-on-2.2.x
```

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

> "Backport PR #59065 on branch 2.2.x (ENH: Fix Python 3.13 test failures & enable CI)"

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).
CI: Set up CI for the free-threaded build of 3.13
State: closed

Related to #59057.

Labels:
name: CI
description: Continuous Integration

Comments:
Good news is free-threading CI is passing! 🎉 

Bad news is there's failures in `Docstring validation, typing, and other manual pre-commit hooks` and `windows-latest actions-312.yaml`, but I don't know how these can be related to this PR (they also appear to be passing on latest `main`).
Both are unrelated to this PR. Windows was flaky and got green after a rerun. Opened a new issue about the doctest failures in #59093.
Thanks @lysnikolaou
DOC: Correct typo in pandas.pivot_table doc
State: closed

Missing 's'

- [ ] 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: Docs

Comments:
Thanks @JulienBacquart
Fixed date_range to change dtype resolution
State: closed

- [ ] closes #59031  (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.

#### Summary
This PR fixes the issue where `pd.date_range` does not infer the resolution from the provided frequency, leading to inconsistencies with `pd.to_datetime`.

#### Changes
- Modified the `date_range` function to infer the resolution based on the frequency.


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.
DEPR: deprecate units 'w', 'd', 'MS', 'US', 'NS' for Timedelta in favor of  'W', 'D', 'ms', 'us', 'ns'
State: closed

xref #58998

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

Comments:
> Nice one, thanks @natmokval!
> 
> Just one question - do we still need `c_DEPR_ABBREVS`, or can `c_DEPR_UNITS` be used in its place?

Thanks @MarcoGorelli for reviewing this PR. I think we need `c_DEPR_ABBREVS`, because so far it's allowed to use lowercase strings `w`, `d`, `b` and `c` for offsets/period. 

After deprecation lowercase strings w, d, b and c denoting frequencies in Week, Day, BusinessDay and CustomBusinessDay classes (PR #58998 is ready for review) we can use `c_DEPR_UNITS` instead `c_DEPR_ABBREVS`.

Thanks @natmokval
Add docstrings to functions, methods, and class in announce.py and contributors.py
State: closed

…ors.py

- [ ] closes #58812
- [ ] All code checks passed
- [ ] Added docstrings to functions, methods, and classes.


Labels:

Comments:
Thanks for the PR! There's already an open PR to fix that issue, so we are going to review that first since it was sent earlier.
Very sorry for wasting your time, you are welcome to contribute to other issues with the `Docs` label though!
DOC: Fix diction: "e.g." -> "i.e."
State: closed

"e.g." means "for example", "i.e." means "that is"

- ~~[ ] 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: Docs

Comments:
Thanks @wjandrea
TST: Fix some test builds for numpy 2.0
State: closed


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: CI
description: Continuous Integration
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
Looks like some of the adjusted tests are causing some failures.
Had to pin numpy on the pyarrow dev build; we can plan to tackle the test failures in that build along with the other builds once they pull in numpy 2.0 by default. Going to merge to get to green
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.2.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 b1e5f0636ab2cc3e6949a051e37dc289616a4a4f
```

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

```
git commit -am 'Backport PR #59046: TST: Fix some test builds for numpy 2.0'
```

4. Push to a named branch:

```
git push YOURFORK 2.2.x:auto-backport-of-pr-59046-on-2.2.x
```

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

> "Backport PR #59046 on branch 2.2.x (TST: Fix some test builds for numpy 2.0)"

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).
DOC: fix typos in User Guide
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: Docs

Comments:
Thanks @ananiavito
BUG: DatetimeIndex.union with non-nano
State: closed

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


Labels:
name: setops
description: union, intersection, difference, symmetric_difference
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks for the speedy fix!
Looks like things are passing here so merging
CLN: BaseGrouper
State: closed

* `BaseGrouper.group_info` seems wholly redundant with `ids` and `ngroups` which are also already defined properties. Removed `group_info` since usages don't need both components
*  `BaseGrouper.shape` was not used
* `DataSplitter.labels` was not used

Labels:
name: Groupby
name: Clean

Comments:
Failing builds appear unrelated.
Thanks @mroeschke
DOC: Change `to_numeric`'s `dtype_backend` default doc
State: closed

- [x] closes #58938  (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.

And wondering that, should all changes made in #54104 be re-reviewed and fixed?

Labels:
name: Docs

Comments:
Thanks @luke396
Change link from NEP 29 to SPEC 0 for Numpy Guidelines
State: closed

- [x] closes #59010 
- [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: Docs

Comments:
Thanks @tilovashahrin
REF: Prefer testing and documenting zoneinfo instead of pytz
State: closed

Split off from https://github.com/pandas-dev/pandas/pull/57045

* Add more documentation about `zoneinfo.ZoneInfo` objects being accepted
* Changed tests/benchmark to prefer stdlib timezone objects instead of pytz objects e.g. `pytz.utc` -> `datetime.timezone.utc`, `pytz.timezone("US/Pacific")` -> `zoneinfo.ZoneInfo("US/Pacific")`

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Docs
name: Timezones
description: Timezone data dtype

Comments:
Going to merge this PR to make progress on https://github.com/pandas-dev/pandas/pull/57045, happy to follow up if needed
DOC: Miss. -> Miss and Master. -> Master
State: closed

- [x] closes #58990
- [ ] [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 @tanyabouman
DEPR: lowercase strings `w`, `d`, `b` and ``c`` denoting frequencies in `Week`, `Day`, `BusinessDay` and `CustomBusinessDay` classes
State: closed

xref #57986

- deprecated lowercase strings `d`, `b` and `c` denoting frequencies in `Day`, `BusinessDay` and `CustomBusinessDay` in favour of `D`, `B` and `C`
- deprecated lowercase strings `w`, `w-mon`, `w-tue`, etc. denoting frequencies in `Week` in favour of `W`, `W-MON`, `W-TUE`, etc. 

we can  deprecated lowercase strings `w`, `d`, `b` and `c` for `Timedelta` in a separate PR

Labels:
name: Frequency
description: DateOffsets
name: Deprecate
description: Functionality to remove in pandas

Comments:
I deprecated lowercase strings `w`,  `d`, `b` and `c` denoting frequencies in favour of `W`, `D`, `B` and `C`. @MarcoGorelli, could you please take a look at this PR? I think CI failures are unrelated to my changes.
@mroeschke thoughts on 2.3 vs 3.0?
Thanks @natmokval and @MarcoGorelli
ENH: numba apply supports positional arguments passed as **kwargs
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/vX.X.X.rst` file if fixing a bug or adding a new feature.

@lithomas1


This is a followup PR that enhances `prepare_function_arguments` introduced in #58767. `prepare_function_arguments` helps to move `**kwargs` to `*args` where possible using `inspect.Signature`.  And now it's also more reasonable to move kwargs check from `get_jit_arguments` to `prepare_function_arguments`.

ref: https://github.com/pandas-dev/pandas/pull/58767#issuecomment-2131310623
> We can also extend `prepare_function_arguments` by adding a option: `num_required_args`, so that all the numba functions' args & kwargs stuff can be handled by this function, instead of in `get_jit_arguments` . For example in groupby, we have `numba_func(group, group_index, *args)`, in this case `num_required_args = 2`:
> 
> https://github.com/pandas-dev/pandas/blob/3b48b17e52f3f3837b9ba8551c932f44633b5ff8/pandas/core/groupby/numba_.py#L102-L120

There are several places where the usage of `get_jit_arguments` is updated and `prepare_function_arguments` is added : `groupby.agg`, `groupby.transform`, `rolling.apply` and `df.apply`.




Labels:
name: Enhancement
name: Groupby
name: Apply
description: Apply, Aggregate, Transform, Map
name: numba
description: numba-accelerated operations

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.
> 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.

Please do not mark as stale, this PR is ready for review.
@auderson - can you merge main.
Failures seem unrelated: `FAILED pandas/tests/io/test_spss.py::test_spss_metadata - AssertionError`.
@lithomas1 - friendly ping.
Also I find there are some methods like `RollingGroupby.apply` which are also impacted by the changes to `RollingAndExpandingMixin.apply`. So I added more tests to cover these methods in `tests/window/test_numba`.
Thanks @auderson
BUG: True cannot be cast to bool in read_excel
State: closed

- [X] closes #58159 
- [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: IO Excel
description: read_excel, to_excel

Comments:
@rhshadrach pinging on green
@rhshadrach @asishm 

PR ready for review. Not sure what's going on with the lone failing test. It's passing locally. Not much info from the test's output to go on.
![image](https://github.com/pandas-dev/pandas/assets/45905457/f4e2b7ca-7b7d-4b45-8639-32023cd022b3)

@asishm @rhshadrach PR is ready for review
@mroeschke PR ready for review
Thanks @rmhowe425
PERF: cache plotting date locators for DatetimeIndex plotting
State: closed

- [x] closes #57035 (Replace xxxx with the GitHub issue number)

Using the last plotting example from the issue

```python
In [1]: import time
   ...: import pandas as pd
   ...: import matplotlib.pyplot as plt

In [2]: ts_index = pd.date_range('2020-01-01 00:00', periods=500_000, freq='10min')
   ...: 
   ...: s_a = pd.Series(data=1, index=ts_index)
   ...: s_b = pd.Series(data=2, index=ts_index)

In [3]: fig, ax = plt.subplots()
   ...: t_s4 = time.time()
   ...: s_a.plot(ax=ax)
   ...: print("Time elapsed Series.plot() on existing plt axis without matplotlib line plot: "
   ...:       f"{(time.time()-t_s4):.2f} seconds")
Time elapsed Series.plot() on existing plt axis without matplotlib line plot: 8.96 seconds  # main
Time elapsed Series.plot() on existing plt axis without matplotlib line plot: 1.34 seconds  # PR
```


Labels:
name: Visualization
description: plotting
name: Performance
description: Memory or execution speed performance

Comments:
Nice!
Thanks @mroeschke 
A slightly late comment: doing the caching this way means multiple axes may share the same result.  I have not chased through but I am not 100% sure that the returned object is not mutable (so you are opening up a bunch of spooky action-at-a-distance bugs).

It may be be better to do the caching on a per-converter basis.

I am a bit curious why mpl is calling `_get_default_locs` many times though...