BrandonFors/pandas-github-issues huggingface dataset:
ENH: add LaTeX math mode with parentheses
State: closed

This pr is related to pr #50398
- [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).

A new way to enter latex-math mode was added. Now we can apply math mode by starting substrings with the character `\(` and ending with the character `\)`.

Labels:
name: Styler
description: conditional formatting using DataFrame.style

Comments:
@attack68, could you please take a look at this pr?
ALso may or may not need a whatsnew release note dependin which release this gets into
I think it would be 2.1 at this point
Hi @attack68, could you please take a look at my last changes?
Hi @attack68. I added an example to latex-math mode and a line to `whatsnew`
Docs for Styler was updated as well: I added a description for `latex-math` mode to the parameter `escape.`

Could you please take a look at my last changes?
Hi @attack68, could you please take a look at my last changes?
not sure why this is failing some checks, but otherwise LGTM.
> not sure why this is failing some checks, but otherwise LGTM.

Thank you @attack68, I updated my branch. Now, all checks pass without failures.
Thanks @natmokval
Re-enable parallel builds in CI
State: closed


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

Comments:
thanks @WillAyd.
@meeseeksdev backport 2.0.x
Thanks for review. Don't think we can backport this without #51525 as well though
My bad, forgot about that one. I don't think we should backport that one, since it changes a lot of the C extensions making it pretty risky.
Yea I'm ok without it being backported. We've lived this long without it on 2.0
By the way I couldn't believe how easy this was to re-enable. Kudos @lithomas1 or whoever has been consolidating those CI jobs - super cool
DEPR: DataFrame.resample axis parameter
State: closed

- [X] closes #51778(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/v2.1.0.rst` file if fixing a bug or adding a new feature.


Labels:
name: Resample
description: resample method
name: Deprecate
description: Functionality to remove in pandas

Comments:
From the original issue. The `rolling` axis parameter should be deprecated too
```
/home/runner/micromamba/envs/test/lib/python3.8/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:
17:2: warning: #warning "Using deprecated NumPy API, 
disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
build finished with problems, 2 warnings.
```
The docs build seems to have failed. 
Is there any such known issue ? ( seems unrelated to the changes made in this PR )
seems like this issue has already been worked upon and merged by #51997  ( CC: @jbrockmendel , @mroeschke  )
[ I guess except for the `resample` part ]
Ah yes, sorry @dannyi96. As you mentioned, this PR can still deprecate the axis parameter for resample if you're still interested 
> Ah yes, sorry @dannyi96. As you mentioned, this PR can still deprecate the axis parameter for resample if you're still interested

Sure @mroeschke , have updated the PR
Nice thanks @dannyi96
assert_frame_equal for set
State: closed

- [x] closes #51727 
- [x] [Tests added and passed]
- [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: Testing
description: pandas testing functions or related to the test suite

Comments:
Ping when ready and I'll merge it.
@topper-123 done 
Thanks, @jayendra-patil33 .
BUG: disallow resample with non-Tick on TimedeltaIndex
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: Resample
description: resample method

Comments:
Thanks @jbrockmendel
BUG: Fix getitem dtype preservation with multiindexes
State: closed

- [x] closes #51261
- [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).
- [ ] ~~Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.~~ NA
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature. Will wait and see if approach is okay first before changelog.


Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: MultiIndex
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.
This is actually waiting on an approval / merge (or more comments), although needs a merge of main now
> Could you add a whatsnew entry in `v.2.1.0.rst`?

Sure, I've had a go at this, I originally left it because I wasn't sure how to clearly decribe what's actually being fixed.
Thanks @m-richards
CI/STYLE: Add auto-fix to ruff
State: closed

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

Comments:
It seems that `ruff`'s `fix` are duplicates of some of our existing autofix. Maybe we need to make some choices between existing methods and `ruff`?
> It seems that ruff's fix are duplicates of some of our existing autofix. Maybe we need to make some choices between existing methods and ruff?

I don't undertstand what you mean, sorry, could you clarify please?

You'll also need to add `exit-non-zero-on-fix` (check the ruff docs for the exact name, it's something like that)
> I don't undertstand what you mean, sorry, could you clarify please?
> 
> You'll also need to add `exit-non-zero-on-fix` (check the ruff docs for the exact name, it's something like that)

I have noticed that some of the rules that `ruff` automatically fixes may be duplicates of the rules we have already added to the main branch. However, this is just an intuitive observation, and I have not confirmed it further.
(It is very likely that my intuition was wrong because I did not specifically compare what both would fix automatically)

And `--exit-non-zero-on-fix` has added.
DOC: change 8610 -> 8601 in Timestamp.isoformat() docstring
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 @kanderso-nrel
DOC: Fix dangling hyphens.
State: closed

Dangling hyphens gets rendered with a space, see screenshot:

![Screenshot 2023-03-10 at 21-46-19 pandas ecosystem — pandas 1 5 3 documentation](https://user-images.githubusercontent.com/239510/224425105-e9cef4ea-2aac-4e99-bb80-ea164947453f.png)

It's currently been added sphinx-lint side in https://github.com/sphinx-contrib/sphinx-lint/pull/56.

Labels:
name: Docs

Comments:
Thanks @JulienPalard
CI: Pin moto image to specific version
State: closed

Should help fix the failing `single_cpu` builds

Labels:
name: CI
description: Continuous Integration
name: IO Network
description: Local or Cloud (AWS, GCS, etc.) IO Issues

Comments:
xref https://github.com/getmoto/moto/issues/6053

Also though this will be fixed with the next published moto image, it's better practice to pin images. Going to merge to get CI to green
BUG: pd.DataFrame.from_dict with a numpy masked array of dtype=object produces NaN instead of None. #51872
State: closed

- [x] closes #51872 
- [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.
- [ ] 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: 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.
@mroeschke Do we still require a new PR for this? 
Yes
https://github.com/pandas-dev/pandas/pull/54787
PERF: Improve performance of MultiIndex._verify_integrity
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.

recomputing the codes can be expensive, also avoids an is_unique check that is not cheap if not cached.

Labels:
name: Performance
description: Memory or execution speed performance
name: MultiIndex

Comments:
Thanks @phofl
ERR: Check that dtype_backend is valid
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.

this sits on top of the actual pr

Labels:
name: NA - MaskedArrays
description: Related to pd.NA and nullable extension arrays
name: Arrow
description: pyarrow functionality

Comments:
Quick thoughts:
- Generally, nullables are still slower than NumPy itself (and need more memory)

Implementation wise:
- There is still no global version to opt in, similar to pyarrow backend
- NA vs NaN in Float64/32 is still open
- Couple of other things

Those things have to be solved before we can start discussing it
Yep, makes sense. On a second thought, if we think pyarrow will eventually be the default, not sure if it's worth to change to nullable first, and then change it again.

In any case, great work with the new interface to change the backend, thanks for taking care of it!
Owee, I'm MrMeeseeks, Look at me.

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

1. Checkout backport branch and update it.

```
git checkout 2.0.x
git pull
```

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

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

```
git commit -am 'Backport PR #51871: ERR: Check that dtype_backend is valid'
```

4. Push to a named branch:

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

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

> "Backport PR #51871 on branch 2.0.x (ERR: Check that dtype_backend is valid)"

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).
                
Yeah that's something else to consider. I just wanted to express that there is some work to do before we can start discussing these topics
ENH: Add to_pydatetime for ArrowExtensionArray
State: closed

- [x] closes #51859 (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: Datetime
description: Datetime data dtype
name: Arrow
description: pyarrow functionality

Comments:
thanks @mroeschke
TYP: fix NDFrame.align
State: closed

- [ ] closes #51863 (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: Typing
description: type annotations, mypy/pyright type checking

Comments:
one comment request, otherwise LGTM
thanks @twoertwein
Remove flake8-rst usage
State: closed

This is required to make all the tests pass and merge #51827

As background, flake8-rst is breaking on python3.10, and the repository has not been maintained since December 2020:
[https://pypi.org/project/flake8-rst/#history](url)

Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
@MarcoGorelli Here is the PR for the flake8-rst removal. Once merged I will update #51827 by merging it to main and push.
STYLE Remove flake8-rst
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.

flake8-rst is unmantained. It causes errors on Python3.10 - (Explanation by @MarcoGorelli) 


Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
Thanks @MarcoGorelli 
Linking to the issue you mention: #46865
So confirming we won't have flake8 checking on our rst files in the meantime?
That's what I understand @mroeschke. 
that's right unfortunately...I'll see if I can fork it, shouldn't be too big of a deal to make it compatible with latest versions of things
PERF: ArrowExtensionArray._from_sequence
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 @phofl 

per https://github.com/pandas-dev/pandas/pull/51643#issuecomment-1459089269

no whatsnew as this was a recent change

Labels:
name: Performance
description: Memory or execution speed performance
name: Arrow
description: pyarrow functionality

Comments:
Thanks @lukemanley
STYLE: enable ruff TCH on some file
State: closed

xref #51740, to fix
```
"pandas/core/construction.py" = ["TCH"] 
"pandas/core/missing.py" = ["TCH"] 
"pandas/tseries/*" = ["TCH"] 
"pandas/tests/*" = ["TCH"] 
"pandas/plotting/*" = ["TCH"] 
```

Labels:
name: Code Style
description: Code style, linting, code_checks

Comments:
thanks for your pr, looks like there's some errors https://github.com/pandas-dev/pandas/actions/runs/4362414904/jobs/7627283459
> thanks for your pr, looks like there's some errors https://github.com/pandas-dev/pandas/actions/runs/4362414904/jobs/7627283459

This was because of a careless mistake and should be fine now
CoW: Set copy=False in internal usages of Series/DataFrame constructors
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 @jbrockmendel This keeps copy=False internally where necessary, to avoid unnecessary copies as a side-effect of https://github.com/pandas-dev/pandas/pull/51731 (by default copying numpy arrays in the DataFrame constructor)

Labels:
name: Copy / view semantics

Comments:
So all non-working cases have been merged, I'd merge this tomorrow if green. Afterwards we can merge the copy True pr, this would cause failures now if merged before this one
Owee, I'm MrMeeseeks, Look at me.

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

1. Checkout backport branch and update it.

```
git checkout 2.0.x
git pull
```

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

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

```
git commit -am 'Backport PR #51834: CoW: Set copy=False in internal usages of Series/DataFrame constructors'
```

4. Push to a named branch:

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

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

> "Backport PR #51834 on branch 2.0.x (CoW: Set copy=False in internal usages of Series/DataFrame constructors)"

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).
                
Manual backport -> https://github.com/pandas-dev/pandas/pull/52012
PERF: avoid non-cython in testing.pyx
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