BrandonFors/pandas-github-issues huggingface dataset:
REGR: DataFrame.transpose resulting in not contiguous data on nullable EAs
State: closed

- [x] closes #57315 (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: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Regression
description: Functionality that used to work in a prior pandas version

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.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 abc3efb63f02814047a1b291ac2b1ee3cd70252f
```

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

```
git commit -am 'Backport PR #57474: REGR: DataFrame.transpose resulting in not contiguous data on nullable EAs'
```

4. Push to a named branch:

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

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

> "Backport PR #57474 on branch 2.2.x (REGR: DataFrame.transpose resulting in not contiguous data on nullable EAs)"

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).
DEPR: remove deprecated method `is_anchored`
State: closed

xref #56594

removed deprecated methods `DateOffset.is_anchored` and `offsets.Tick.is_anchored`

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

Comments:
I enforced the deprecation of `DateOffset.is_anchored` and `offsets.Tick.is_anchored`. @MarcoGorelli, could you please take a look at this PR? I think, CI failures are not related to my changes.
Thanks @MarcoGorelli for reviewing this PR.
BUG: guess_datetime_format fails to infer timeformat
State: closed

- [x] closes #57452(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: Datetime
description: Datetime data dtype

Comments:
Explanation of the fix:

The previous code below failed for date time str of the kind like "2023-11-09T20:23:46".

In L1006, `parsed_formatted` is parsed to the same "2023" for both "%H%M" and "%Y", then in L1010 format_guess[0] becomes "%H%M", rather than the correct "%Y". Noticing the order in `datetime_attrs_to_format`, I thus move "%Y" before "%H%M" to fix the bug.

https://github.com/pandas-dev/pandas/blob/63dc0f76faa208450b8aaa57246029fcf94d015b/pandas/_libs/tslibs/parsing.pyx#L996-L1013
it's been a while since I looked at this function :) taking a look today, thanks for the fix
DEPR: to_pytimedelta return Index[object]
State: closed

- [x] closes #57463 
- [ ] [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 an entry in the latest `doc/source/whatsnew/v3.0.0.rst` file 


Labels:

Comments:
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.
DOC: Making pandas always lowercase
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 @rhshadrach
REGR: Behavior differs when adding Series to frame between matching and non matching index
State: closed

follow up to #56426

this was inconsistent now for matching vs non-matching

cc @lukemanley 

Labels:
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
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. Closing to clear the queue but feel free to reopen if you have time to circle back
DOC: add section Raises to PeriodIndex docstring
State: closed

we raise a ValueError: "freq not specified and cannot be inferred" if both freq and dtype are not specified in `PeriodIndex`

```
>>> pd.PeriodIndex(["2023-01-01", "2023-02-01", "2023-03-01", "2023-04-01"], freq="M")
PeriodIndex(['2023-01', '2023-02', '2023-03', '2023-04'], dtype='period[M]')

>>> pd.PeriodIndex(["2023-01-01", "2023-02-01", "2023-03-01", "2023-04-01"], dtype ="period[M]")
PeriodIndex(['2023-01', '2023-02', '2023-03', '2023-04'], dtype='period[M]')

>>> pd.PeriodIndex(["2023-01-01", "2023-02-01", "2023-03-01", "2023-04-01"])
ValueError: freq not specified and cannot be inferred
```
I added a section "Raises" to `PeriodIndex` documentation.

Labels:
name: Docs

Comments:
Thanks @natmokval
PERF: use copy=False in constructor in unstack (CoW)
State: closed

xref https://github.com/pandas-dev/pandas/issues/57431

I _think_ we are sure that the `values` from `self.get_new_values(..)`, which we pass here to the DataFrame constructor, are always new values owned by us (not shared by any other object), and so we can safely set `copy=False` in that case.

Mimicking the `time_unstack` benchmark:
```
m = 100
n = 1000

levels = np.arange(m)
index = pd.MultiIndex.from_product([levels] * 2)
columns = np.arange(n)
values = np.arange(m * m * n).reshape(m * m, n)
df = pd.DataFrame(values, index, columns)
```

```
In [2]: %timeit df.unstack()
316 ms ± 44.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)   # main
228 ms ± 25.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)   # PR
```

Labels:
name: Performance
description: Memory or execution speed performance
name: Copy / view semantics

Comments:
> I'm not sure that's the case. This path:

Ah, yes, I missed the early `return` there.

Continued in -> https://github.com/pandas-dev/pandas/pull/57487
Release the gil in take for axis=1
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.

We missed this when we took care of axis=0 in Basel

Labels:

Comments:
Thanks @phofl 
@meeseeksdev backport 2.2.x
I'd like to backport this, it should be very very minor but makes debugging performance shit in dask quite cumbersome (cc @mroeschke for visibility)
DOC: Set verbose parameter as deprecated in docstring
State: closed

This PR follows:
- #56556

TODO:
- [x] closes #57451
- [ ] [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 CSV
description: read_csv, to_csv

Comments:
/preview
/preview
thx
There was a problem with the previewer, seems like GitHub only returns the first 30 elements of a request by default, we've got more than 30 jobs, and the job we needed to download the artifact wasn't being returned. I increased the number of returned items to 100, the maximum, and seems like the preview is working again.

This is rendering as expected:

https://pandas.pydata.org/preview/pandas-dev/pandas/57450/docs/reference/api/pandas.read_csv.html

Thanks again @albertvillanova and sorry for the noise.
DOC: fix SA05 errors in docstrings for pandas.core.window Expanding and Rolling, and SeriesGroupBy
State: closed

- [x] closes #57392 
- [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: Code Style
description: Code style, linting, code_checks

Comments:
Thanks @williamking1221  and @jordan-d-murphy  for the review
PERF: Allow RangeIndex.take to return a RangeIndex when possible
State: closed

Discovered in https://github.com/pandas-dev/pandas/pull/57441

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

Comments:
thx @mroeschke  
https://asv-runner.github.io/asv-collection/pandas/#frame_methods.SortValues.time_frame_sort_values

Looks like this caused a pretty bad regression
CLN: Enforce deprecation of using alias for builtin/NumPy funcs
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: #53974

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

Comments:
A bit of a complication here - I missed one of the paths in apply where we use the builtin/NumPy -> cython table.

https://github.com/pandas-dev/pandas/blob/54d2033fabc1a064b05842b41f8247ae3fdd6fd6/pandas/core/apply.py#L1439-L1442

Sadly, it's probably one of the more common cases where users will see a difference. This is because `apply` will first try to operate row-by-row (unless `by_row=False`), and e.g. `np.sum` works on rows.

I'm thinking we enforce the deprecation as-is (we already were not very consistent with where we were making these replacements), and deprecate the last remaining case as part of 3.x.

cc @jorisvandenbossche @mroeschke 
Yes, sounds good to me too!
@mroeschke - green now.
Thanks @rhshadrach
adding pow example for dataframe #57419
State: closed

Added example for DataFrame.pow()

- [x] closes #57419
- [ ] [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:
I found that data format in the documentation must be '{{....}}'  not '{...}'.  
![image](https://github.com/pandas-dev/pandas/assets/31467361/0823a5e4-6422-4f97-8058-ad67a80c4657)

validation by runing command "python scripts/validate_docstrings.py pandas.DataFrame.pow"

Hope it can be helpful。 @santhoshbethi

Thank you @dawangbaixiaofu

https://github.com/pandas-dev/pandas/actions/runs/7942950011/job/21686768999?pr=57442 has failed due to a permission error. Can we rerun this job?

@dawangbaixiaofu could you please check this one 
hi @mroeschke . Can you please check this pipeline? What am I missing here?
Thanks @santhoshbethi
DOC: fix SA05 errors in docstrings for `pandas.plotting.bootstrap_plot` and `pandas.plotting.radviz`
State: closed

All SA05 Errors resolved in the following cases:

1. scripts/validate_docstrings.py --format=actions --errors=SA05 pandas.plotting.bootstrap_plot
2. scripts/validate_docstrings.py --format=actions --errors=SA05 pandas.plotting.radviz
3. try to fix a `RT03    Return value has no description` in pandas.plotting.radviz



- [x]  xref [DOC: fix SA05 errors in docstrings  #57392](https://github.com/pandas-dev/pandas/issues/57392)
- [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 @ooooo-create
DOC: fix SA05 errors in docstrings for pandas.core.resample.Resampler…
State: closed

Small code change, removing the two functions above for SA05 ignore functions.
- [ ] xref #57392 
- [ ] [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: Code Style
description: Code style, linting, code_checks

Comments:
Thanks @williamking1221
CLN: shift with freq and fill_value, to_pydatetime returning Series
State: closed

xref https://github.com/pandas-dev/pandas/pull/52459, https://github.com/pandas-dev/pandas/pull/54818

Labels:
name: Clean

Comments:
Going to merge this one. Can follow up if needed
> Going to merge this one. Can follow up if needed

I am opening a PR #57469 to add future warning when calling ```to_pytimedelta``` function, but here it seems that you changed the return type to Series and removed all warning-related imports. Do you want me to do the same thing for ```to_pytimedelta```?
ENH: Preserve Series index on `json_normalize`
State: closed

- [ ] closes #51452 
- [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.

Passing a Series as input to `json_normalize` was already functional before but undocumented as a feature, and had the issue linked above where it would not preserve the index of the input series.

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

Comments:
Thanks @nworb-cire 
Hi @mroeschke @nworb-cire, I just saw this via email that the original issue had been closed.  (@nworb-cire thanks for the fix!).

The code looks valid and follows the principle-of-least-surprise that the index is retained when `json_normalize` input is  a series.

However, that is a breaking change on existing pandas code in the wild that might rely on json_normalise always returning a fresh 0:N index.

I think the **patch notes should alert to the change in behaviour more strongly than it currently does**.  

@mroeschke I assume that the breaking change is okay as part of pandas 3.0?  If pandas guidelines are not okay with breaking changes we could patch in an extra arg for the function such that the default behaviour is the former (weird) behaviour but users can toggle on the new functionality.
> I assume that the breaking change is okay as part of pandas 3.0?

Correct. I am not sure if adding an extra argument to get the old behavior is entirely needed as a user can get the old behavior by calling `reset_index` before using `json_normalize`, but a doc example showing that would be welcome.
> I am not sure if adding an extra argument to get the old behavior is entirely needed as a user can get the old behavior by calling reset_index before using json_normalize,

The only reason to add the extra arg would be to make the code backwards compatible.  If we are happy to make a breaking change then there is no need for it.
DOC: Resolve SA05 errors for all ExponentialMovingWindow, Expanding, Rolling, and Window
State: closed

A small change in a shared template resolved all SA05 errors for the following: 
```
pandas.core.window.ewm.ExponentialMovingWindow.corr
pandas.core.window.ewm.ExponentialMovingWindow.cov
pandas.core.window.ewm.ExponentialMovingWindow.mean
pandas.core.window.ewm.ExponentialMovingWindow.std
pandas.core.window.ewm.ExponentialMovingWindow.sum
pandas.core.window.ewm.ExponentialMovingWindow.var

pandas.core.window.expanding.Expanding.apply
pandas.core.window.expanding.Expanding.corr
pandas.core.window.expanding.Expanding.count
pandas.core.window.expanding.Expanding.cov
pandas.core.window.expanding.Expanding.kurt
pandas.core.window.expanding.Expanding.max
pandas.core.window.expanding.Expanding.mean
pandas.core.window.expanding.Expanding.median
pandas.core.window.expanding.Expanding.min
pandas.core.window.expanding.Expanding.quantile
pandas.core.window.expanding.Expanding.rank
pandas.core.window.expanding.Expanding.sem
pandas.core.window.expanding.Expanding.skew
pandas.core.window.expanding.Expanding.std
pandas.core.window.expanding.Expanding.sum
pandas.core.window.expanding.Expanding.var

pandas.core.window.rolling.Rolling.apply
pandas.core.window.rolling.Rolling.corr
pandas.core.window.rolling.Rolling.count
pandas.core.window.rolling.Rolling.cov
pandas.core.window.rolling.Rolling.kurt
pandas.core.window.rolling.Rolling.max
pandas.core.window.rolling.Rolling.mean
pandas.core.window.rolling.Rolling.median
pandas.core.window.rolling.Rolling.min
pandas.core.window.rolling.Rolling.quantile
pandas.core.window.rolling.Rolling.rank
pandas.core.window.rolling.Rolling.sem
pandas.core.window.rolling.Rolling.skew
pandas.core.window.rolling.Rolling.std
pandas.core.window.rolling.Rolling.sum
pandas.core.window.rolling.Rolling.var

pandas.core.window.rolling.Window.mean
pandas.core.window.rolling.Window.std
pandas.core.window.rolling.Window.sum
pandas.core.window.rolling.Window.var

pandas.plotting.boxplot
```

- [x]  xref #57392  
- [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
name: Clean

Comments:
Thanks Jordan, very nice PR
DOC: fix SA05 errors in docstring for pandas.core.groupby.DataFrameGroupBy - first, last
State: closed

- [x] xref #57392
- [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.

fixing SA05 errors in docstrings for:
pandas.core.groupby.DataFrameGroupBy.first
pandas.core.groupby.DataFrameGroupBy.last


Labels:
name: Docs
name: Clean

Comments:
> lgtm, thanks @Pistonamey

Your Welcome, so no conflicts, which means they will be merged ?
Thanks @Pistonamey
Remove method from fillna
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
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.