BrandonFors/pandas-github-issues huggingface dataset:
CI/TST: Don't require length for construct_1d_arraylike_from_scalar cast to float64
State: closed

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


Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
Most of the remaining ones look like things we want to change anyway? Saw one test that was not supposed to raise a FutureWarning
> Most of the remaining ones look like things we want to change anyway? Saw one test that was not supposed to raise a FutureWarning

Correct, the numpy `RuntimeWarning`s align with our 1.4 deprecation of converting np.nan to i8 dtype: https://github.com/pandas-dev/pandas/pull/45136

The additional `length` change should also be backwards compatible so I think these changes can be backported so 1.4.3 and be compatible with numpy 1.24

```
 =================================== FAILURES ===================================
______________ TestMergeDtypes.test_merge_on_ints_floats_warning _______________
[gw1] linux -- Python 3.10.4 /usr/share/miniconda/envs/test/bin/python
self = <pandas.tests.reshape.merge.test_merge.TestMergeDtypes object at 0x7f2644979420>
    def test_merge_on_ints_floats_warning(self):
        # GH 16[57](https://github.com/pandas-dev/pandas/runs/6940154831?check_suite_focus=true#step:8:59)2
        # merge will produce a warning when merging on int and
        # float columns where the float values are not exactly
        # equal to their int representation
        A = DataFrame({"X": [1, 2, 3]})
        B = DataFrame({"Y": [1.1, 2.5, 3.0]})
        expected = DataFrame({"X": [3], "Y": [3.0]})
        with tm.assert_produces_warning(UserWarning):
            result = A.merge(B, left_on="X", right_on="Y")
            tm.assert_frame_equal(result, expected)
        with tm.assert_produces_warning(UserWarning):
            result = B.merge(A, left_on="Y", right_on="X")
            tm.assert_frame_equal(result, expected[["Y", "X"]])
        # test no warning if float has NaNs
        B = DataFrame({"Y": [np.nan, np.nan, 3.0]})
      with tm.assert_produces_warning(None):
```

this is failing
will merge later today if no objections
Thanks @mroeschke
DOC: update tutorials.rst to include website for searchable Pandas recipes
State: closed

- [x] 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
- [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 @TraverseTowner
TST,WARN: read_csv raises warning at wrong stacklevel, but _assert_raised_with_correct_stacklevel doesn't fail 
State: closed

- [x] closes #47385 (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
> Do you think this needs a whatsnew for 1.5?

yes, probably, thanks

should this be backported too, as it affects legibility of warnings to do with an upcoming deprecation?
> > Do you think this needs a whatsnew for 1.5?
> 
> yes, probably, thanks
> 
> should this be backported too, as it affects legibility of warnings to do with an upcoming deprecation?

Yeah I think this would be okay to backport cc @simonjayhawkins  
> Yeah I think this would be okay to backport cc @simonjayhawkins

sure. there's a bug fix section in the 1.4.4 release notes.
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 1.4.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 109be4812cfd96009dd78c310124695d466ac2cf
```

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

```
git commit -am "Backport PR #47387: TST,WARN: read_csv raises warning at wrong stacklevel, but _assert_raised_with_correct_stacklevel doesn't fail "
```

4. Push to a named branch:

```
git push YOURFORK 1.4.x:auto-backport-of-pr-47387-on-1.4.x
```

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

> "Backport PR #47387 on branch 1.4.x (TST,WARN: read_csv raises warning at wrong stacklevel, but _assert_raised_with_correct_stacklevel doesn't fail )"

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).
ENH/TST: Add BaseInterfaceTests tests for ArrowExtensionArray
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).



Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Arrow
description: pyarrow functionality

Comments:
ahh merge conflict!
thanks very nice @mroeschke 
@mroeschke i've reverted this. can you resubmit.
Revert inclusive default change of IntervalDtype
State: closed

- [x] xref #47365 (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.

This adresses the changed default, will add the attribute back in as a follow up


Labels:
name: Interval
description: Interval data type

Comments:
I've moved closed to the end of the arguments, this means the previous position of closed is now filled by inclusive, e.g. positional arguments just work and if something is using keyword arguments, it will show the warning but not disturb the previous order of arguments.

Added propeties for closed and deprecated them

@simonjayhawkins Coud you have a look?

Things still to do (but as follow up):

- deprecate ``set_closed`` and add ``set_inclusive``
- rename private ``_closed`` attritubtes
- Clean up tests
- Clean up typing
this looks fine ex the comments
Will have a look. I think if we remove the deprecation for IntervallTree, we should be able to remove ``_warning_interval``

Edit: Will probably put up a few clean up prs separately to keep them easy to review
BUG: DataFrame.loc not aligning dict when setting to a column
State: closed

- [x] closes #47216 (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
Thanks @phofl
CI: Add ccache
State: closed

Add Sccache https://github.com/mozilla/sccache to the GHA CI. Saves around 5 minutes per run.

Unfortunately it requires some hacks, namely changing a temporary Windows directory and patching distutils.

- [ ] 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: Stale

Comments:
> Might need some documentation on how to manually invalidate the cache. We can potentially get into a bad state like e.g. #47305

Done!
While this looks good, the `setup.py` changes may conflict with https://github.com/pandas-dev/pandas/pull/47380 fairly soon. Mind pivoting to other CI improvements (like environment caching) if you have the time until a decision has been made on the linked PR?
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.
Could some of the hacks be avoided by only caching on non-windows?
Only the TMPDIR one. Actually it might already be unnecessary with the latest version of sccache.
@jonashaag status here?  i was looking forward to this one
I put this on hold to wait for the Meson changes. Are they done already?
> I put this on hold to wait for the Meson changes. Are they done already?

Seems like #49115 is almost ready, maybe a good time to update 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.
Do you think the sccache-action could be easily be used for this instead? https://github.com/Mozilla-Actions/sccache-action
This is already using another action. What would be the advantage of switching actions? TBH I think the actions are both very similar 
Ah I didn't know if it would make this workflow any simpler, in addition to be more of an official looking ccache action by mozilla

Closing in favor of https://github.com/pandas-dev/pandas/pull/53211
ENH: Move IndexingError to error/__init__.py per GH27656
State: closed

- [x] xref #27656. this GitHub issue is being done in multiple parts
- [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/v1.5.0.rst` file if fixing a bug or adding a new feature.

I moved the `from pandas.errors import UndefinedVariableError` statement to the top for `pandas/tests/frame/test_query_eval.py` as a follow up from a comment on https://github.com/pandas-dev/pandas/pull/47338.


Labels:
name: Enhancement
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Thanks again @dataxerik (failures were unrelated)
ENH: Timestamp.tz_localize support non-nano
State: closed

Sits on top of #47346

Not sure why the .github files are in the diff, they don't show up in the diff locally

Labels:
name: Timezones
description: Timezone data dtype
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
yah ATM we support s, ms, us, ns, raise on the other resos.  We could in principle support some of the others but im not aware of much demand for those, and they would impose other complications
Okay good to know. At what codepath would those larger frequencies raise? 

Curious because it would be nice to specifically raise in tz_localize/tz_convert that freq >= minute is not supported because DST is hard.
> Okay good to know. At what codepath would those larger frequencies raise?

In the constructor Timestamp._from_value_and_reso, though looks like I was wrong and minutes is allowed.  will change that in an upcoming PR (also Timedelta allows a bunch more resos that ill probably disable)
TST: GH 27185 Test to check df with timedelta & Int NA sums correctly
State: closed

- [x] closes #27185
- [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).
- [NA] 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.

Open to feedback on how to improve the PR - not sure if this is exactly what the original issue was looking for.


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate
name: Timedelta
description: Timedelta data type

Comments:
Thanks @aamnv
Bug: GroupBy raising error with None in first level of MultiIndex
State: closed

- [x] closes #47348 (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

@rhshadrach Would you mind having a look? That ``key=None`` matches seems to be an accident to me.

Labels:
name: Groupby

Comments:
Thanks @phofl and @rhshadrach
REGR: MultiIndex.dtypes has regular Index instead of MultiIndex index
State: closed

- [x] closes #46900 (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: MultiIndex

Comments:
Thanks @phofl
ENH: Timestamp.__sub__(datetimelike) support non-nano
State: closed

With mixed resos, cast to the lower reso, and only if doing so is lossless.

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

Comments:
updated.  getting the `mod` info in the exception message would be a bit of a hassle, so punting on that for now
TST: adding a test for bar plot with intervalrange xaxis
State: closed

- [x] closes #38969
- [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).


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Visualization
description: plotting
name: Interval
description: Interval data type

Comments:
The smoke test LGTM
The assert is giving me a weird error locally, maybe you can give me some advice here: 
The two lists appear to be identical yet I get this error:
```
E       AssertionError: assert [Text(0, 0, '([0, 1],)'), Text(1, 0, '([1, 2],)')] == [Text(0, 0, '([0, 1],)'), Text(1, 0, '([1, 2],)')]
E         At index 0 diff: Text(0, 0, '([0, 1],)') != Text(0, 0, '([0, 1],)')
E         Full diff:
E           [Text(0, 0, '([0, 1],)'), Text(1, 0, '([1, 2],)')]
```
I have a fix coming up! ✨
OK, I think this is ready now.

I also opened an issue with Matplotlib to add __eq__ to the Text object in the hope that writing these tests would be easier in the future 😇 
> I also opened an issue with Matplotlib to add eq to the Text object in the hope that writing these tests would be easier in the future 😇

this would be really nice!
See https://github.com/matplotlib/matplotlib/issues/23273 for follow up ✨ 
@phofl I'm getting this error on the CI now:
```
/opt/python/cp38-cp38/lib/python3.8/importlib/__init__.py:127: in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
pandas/tests/plotting/test_misc.py:3: in <module>
    from matplotlib.text import Text
E   ModuleNotFoundError: No module named 'matplotlib'
```
Might be because I moved the import up? Any suggestions on how to proceed? revert or what's the underlying cause to address?
Ah this makes sense. Looks like we are not installing matplotlib everywhere. Reverting is the best way forward here, this explains why the imports were done within the tests.

Thanks for trying this out
thx @noatamir
BUG: Series.setitem losing precision when enlarging
State: closed

- [x] xref #32346 (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [x] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

We have to preserve the dtype here. This only fixes this case for Series, not for DataFames


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
thanks @phofl 
Thx, I'll open a follow up for the ea case with non matching dtypes
CI: Temporarily build pandas with N_JOBS=1 to avoid flakiness
State: closed

xref: #47305


Labels:
name: Build
description: Library building on various platforms
name: CI
description: Continuous Integration

Comments:
Does this affect the CI speed?
Looks like the build step goes from ~4-6 min to ~8-10 min. IMO it's an okay trade off to prevent flakiness.

Plus caching these builds might be in the works soon https://github.com/pandas-dev/pandas/issues/46643 
Works for me
The ImportError hasn't show up when only using 1 worker after a few merges of main, so I think this temporarily solves the flakiness. Merging.
ENH: Move UndefinedVariableError to error/__init__.py per GH27656
State: closed

- [x] xref #27656. this GitHub issue is being done in multiple parts
- [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/v1.5.0.rst` file if fixing a bug or adding a new feature.

I made a tweak to scripts/pandas_errors_documented.py because it was flagging the `annotations` import not being in the testing.rst. I excluded __future__ module from the documentation check because the script's intent seems to be ensuring the custom pandas errors are documented. I also fixed a typo.


Labels:
name: Enhancement
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Thanks again!
DOC: GH5456 Adding workaround info on NA / NaT handling for groupby
State: closed

- [x] closes #5456
- [NA] [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).
- [NA] 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.

Took a stab at this by parsing through the initial issue and related topics - let me know if the intent was different, happy to edit.


Labels:

Comments:
Good point @phofl. Looks we also have an example in the groupby docstring demonstrating this behavior so I don't think this workaround explanation is needed. 

Thanks for the PR @aamnv but going to close since I think this old issue is not actionable anymore, but feel free to address any of the other `good first issue` issues!
BUG: concat not sorting mixed column names when None is included
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.

I think this is more sensible than the previous version, where an error was raised when None was included.


Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Index
description: Related to the Index class or subclasses

Comments:
Thanks @phofl