BrandonFors/pandas-github-issues huggingface dataset:
ENH: bfill for interval indexing added GH#51503 #51503 
State: closed

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

Comments:
Test is done for `backfill/bfill` methods with time intervals. `nearest` and `pad/ffill `will be added in future commits.
Thanks for your pull request @hamedgibago. I noticed this is your first pull request into pandas, so I would recommend first tackling an issue labeled `good first issue`. The issue you are tackling is a bit more complex and has not been triaged by a maintainer yet 
> 

I'll do `good first issue` issues. Despite this comment you mentioned and not all features added for `bfill`, because All checks have passed and green, will be this PR accepted?
I am dubious that that for looping solution over each element will be performant enough for this feature
> I am dubious that that for looping solution over each element will be performant enough for this feature

I've added this for type of date time check. Let me see if `self._maybe_cast_listlike_indexer` and `self._maybe_convert_i8(t)` will be removed any error happen or not. 
For the second loop of comparing indexes, I'll think another way, as I mentioned in `TODO` comment in the code
Thanks for this pull request, but it appears there hasn't been much traction on this PR in a while so closing for how. Happy for you to tackle an issue that has been triaged or a `good first issue`
DOC: improve (dark) theme getting started tutorials
State: closed

- [x] closes #51860 
- [ ] [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.

This PR updates thes CSS relevant for the getting started section  of the documentation to make sure the available css-variables of the pydata-sphinx-theme are used instead of custom css-colors. As such, the pages will also work in dark-mode (as colors are adjusted based on the used variable names).



Labels:
name: Docs
name: Web
description: pandas website

Comments:
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/52097/
ENH: support na_action in SparseArray.map 
State: closed

- [x] closes #52095
- [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.

Followup to #51809.

Labels:
name: Sparse
description: Sparse Data Type

Comments:
Thanks @topper-123
REF: GroupBy.any/all use WrappedCythonOp
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: Refactor
description: Internal refactoring of code
name: Groupby
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
Thanks @jbrockmendel
BUG: Fix some more arrow CSV tests
State: closed

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


Labels:
name: IO CSV
description: read_csv, to_csv
name: Arrow
description: pyarrow functionality

Comments:
Anyone want to have another look?
Assuming we are OK with read_csv returning Int64 when dtype_backend is numpy_nullable, this should be good to go now.
thx @lithomas1 
@meeseeksdev backport 2.0.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.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 f29ef30e9939468e1b866b6a554ee6b69b8322c5
```

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

```
git commit -am 'Backport PR #52087: BUG: Fix some more arrow CSV tests'
```

4. Push to a named branch:

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

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

> "Backport PR #52087 on branch 2.0.x (BUG: Fix some more arrow CSV tests)"

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).
The Value Error saying that empty data was passed with indices specif…
State: closed

…ied is now only raised when that is indeed the case.

The following example incorrectly triggers the ValueError saying that "Empty data passed with indices specified."

`pd.DataFrame(np.zeros((0, 2)), columns=['a', 'b', 'c'])`

- [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: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
Hey, thank you for your quick response.
1. The function still raises a ValueError, but no longer with an incorrect message. I am not sure if this needs to be tested.
2. I am not comparing an integer with a boolean. I am doing chained comparison. a == b < c gets expanded to a == b and b < c.
> I am not sure if this needs to be tested.

yup, definitely

>  I am doing chained comparison

ah I see, thanks
Nice, thanks! Can you add a whatsnew note to `2.1.0.rst` too please?
Thanks @Xargonus
DataFrame pivot_table nunique aggfunc test GH#29080
State: closed

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


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Thanks @liang3zy22
DEPR: be stricter in assert_almost_equal
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.

xref #18463 this doesn't get us all the way there since assert_index_equal and assert_numpy_array_equal go through different paths.

Note the many tests that needed to be changed; some of these likely represent undesired behaviors.

@phofl i found a usecase for downcast=False in fillna!

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks @jbrockmendel 
This turns out to be a bit annoying while updating pyarrow tests for certain cases. For example, we have tests where we check that in the input you can have mixed NA-likes values. To assert the result, with this PR we need to construct the expected data with a consistent NA value. For small data it's typically straightforward to redefine it correctly. For larger data, that's a bit more annoying though.

One thing that also doesn't help is that we don't allow filling NAs with `None` (pyarrow uses None for object dtype arrays when converting to numpy/pandas): `df.fillna(None)` errors.

Should we also consider adding a keyword for relaxing this, so you can override the strict default for cases you don't care about the difference? (which was also suggested in https://github.com/pandas-dev/pandas/issues/18463)
Any chance of getting a flag in `assert_X_equal()` to restore the old behaviour? It's very useful when using `check_dtype=False`.

Or maybe it could be connected to `check_dtype` (restoring the old behaviour when False)?
BUG: info raising when use_numba is set
State: closed

- [x] closes #51922 (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.

Alternative would be to reimplement sum for numba to return int when int input is given

Labels:
name: numba
description: numba-accelerated operations

Comments:
Thanks @phofl 

> Alternative would be to reimplement sum for numba to return int when int input is given

xref https://github.com/pandas-dev/pandas/issues/44952
BUG: Fix regression when using Series with arrow string array
State: closed

- [x] closes #51844 (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.
- [ ] 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: Arrow
description: pyarrow functionality

Comments:
thanks @phofl 
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 7e92ca6ae81a0260a24ba3440be556bb71d30848
```

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

```
git commit -am 'Backport PR #52076: BUG: Fix regression when using Series with arrow string array'
```

4. Push to a named branch:

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

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

> "Backport PR #52076 on branch 2.0.x (BUG: Fix regression when using Series with arrow string array)"

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).
BUG: Arrow setitem segfaults when len > 145 000
State: closed

- [x] closes #52059 (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.
- [ ] 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: Arrow
description: pyarrow functionality

Comments:
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 10000db023208c1db0bba6a7d819bfe87dc49908
```

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

```
git commit -am 'Backport PR #52075: BUG: Arrow setitem segfaults when len > 145 000'
```

4. Push to a named branch:

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

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

> "Backport PR #52075 on branch 2.0.x (BUG: Arrow setitem segfaults when len > 145 000)"

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).
                
Thanks @phofl 
thx for doing the backport
BUG: Corrected TypeError message
State: closed

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


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: Timezones
description: Timezone data dtype

Comments:
Sure @phofl but where??? at pandas/tests/indexes/datetimes/test_datetime.py ? 
or
pandas/tests/indexes/datetimes/test_indexing.py  maybe?  

Thanks in advance 
I'd suggest

```
pandas/tests/indexes/datetimes/test_constructors.py
```
Done 
thx @DeaMariaLeon 
Thank you @phofl
DOC: Fix docstring for `pandas.util._decorators.doc`
State: closed

Trivial PR to fix something I noticed while reading pandas source code. I think most of the below checks don't apply.

- [ ] 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
- [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:
thx @deepyaman
WEB: Sort PDEPs by their number
State: closed

Sort PDEPs by their number rather than the title. 

- [x] closes #51662  


Labels:
name: Web
description: pandas website

Comments:
@datapythonista thx for review. New commit has the suggested changes.
> @datapythonista thx for review. New commit has the suggested changes.

@datapythonista being a pest :)
> Thanks @kostyafarber, very nice. Looks great, my only concern is that if one of the sorted issues doesn't use `PDEP-\d...` as the title, I think this will fail with an error difficult to debug. I'm in my phone and can't check in detail, but let me know if I'm wrong. If I'm correct, maybe we can move the lambda to a function (can be inside the same function) and raise our own exception and error message when the pattern is not found. Thanks!

No worries, I think that's a sensible concern, I'll investigate and let you know.
@datapythonista re-wrote to raise when we don't get a match with (useful) msg. Cheers
@datapythonista friendly ping. 
/preview
Website preview of this PR available at: https://pandas.pydata.org/preview/52072/
Thanks @kostyafarber
DEPR: Properly enforce group_keys defaulting to False in resample
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.

Some things that were missed in enforcing the deprecation of #34998. Since `lib.no_default` is truthy, we were treating the default in resample as True rather than False.

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

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

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

```
git commit -am 'Backport PR #52071: DEPR: Properly enforce group_keys defaulting to False in resample'
```

4. Push to a named branch:

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

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

> "Backport PR #52071 on branch 2.0.x (DEPR: Properly enforce group_keys defaulting to False in resample)"

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).
                
@rhshadrach  can you backport?
CoW: Switch to copy=False everywhere for Series constructor
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: Copy / view semantics

Comments:
merging this, removed all the cases that weren't totally clear. Will open an issue tomorrow
Optimizing the code for autotyping
State: closed

1) Use argparse's default argument instead of checking if not args.paths 
2) Use subprocess.run()'s capture_output argument instead of check=True to capture the output of the command 
3) Use sys.exit(output.returncode) directly instead of checking the return code

- [ ] closes #52067 
- [ ] [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:

Comments:
thanks @haiyashah  for your PR

if you're interested in contributing, I suggest you look at the [good first issues](https://github.com/pandas-dev/pandas/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) and read the contributing guide

closing for now then
TST: Remove some xfails in groupby tests
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
name: Groupby
name: Clean

Comments:
thanks @rhshadrach