BrandonFors/pandas-github-issues huggingface dataset:
TST: Verify mask's return keeps dtype
State: closed

- [ ] closes #50448
- [ ] [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: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
thx @luke396
add test to check crosstab supports Float64 formats
State: closed

- [x] closes #50313
- [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 test is added. The test validates `crosstab` behavior with `Float64`. I have checked that the problem occurs when `Float64` is used together with `margins=True`. 
The test fails on `1.5.2` and passes on `main`.

Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
thx @natmokval 
Thank you, @phofl, for reviewing my PR.
DOC: skip a doctest that writes to disk
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
- [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.

Running `./scripts/validate_docstrings.py` was returning the following error 
```
Exception: The following files were leftover from the doctest: {'formatted_file.xlsx'}. Please use # doctest: +SKIP
```
This was due to the doctest writing to disk. This PR fixes this issue.


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

Comments:
thx @moisan
API: to_datetime allow mixed numeric/datetime with errors=coerce
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: Datetime
description: Datetime data dtype

Comments:
updated+green
Thanks @jbrockmendel
CI: Fix npdev error on deprecation & future warnings
State: closed

As discovered in https://github.com/pandas-dev/pandas/pull/50386, specifying modules in the warning filters need the fully qualified module path which `numpy` is not. In order to not enumerate all the modules paths in numpy, just have this build fail on any `DeprecationWarning` or `FutureWarning`

Labels:
name: CI
description: Continuous Integration

Comments:
Going to merge this. I think it's important we catch these new deprecation based warnings
CI: Reduce duplicate pyarrow version testing
State: closed

We probably don't need to be testing multiple permutations of pyarrow version & Python version in the CI. Instead:

* PY310 builds will test pyarrow version 6 - 10
* PY38 & 39 builds will test pyarrow = 10


Labels:
name: CI
description: Continuous Integration
name: Arrow
description: pyarrow functionality

Comments:
Id be more comfortable with testing all versions on python 3.10 or maybe 3.9. 

We will remove support for 3.8 soonish, so I think this makes more sense?
> Id be more comfortable with testing all versions on python 3.10 or maybe 3.9.
> 
> We will remove support for 3.8 soonish, so I think this makes more sense?

Makes sense, will run the different versions on 3.10 instead
thx @mroeschke
BUG: handle duplicated columns when using `read_sql` (#44421)
State: closed

- [X] closes #44421 
- [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.

Hello everyone,

This is my first PR on this project, so don't hesitate to be picky.
I've normally fixed the issue found in the issue #44421, it was a simple error due to duplicated columns names.

I tried to respect the rules for PR, but if I missed something, feel free to comment ;)
Have a good day!

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.
PERF: ArrowExtensionArray.searchsorted
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/v2.0.0.rst` file if fixing a bug or adding a new feature.

Perf improvement in `ArrowExtensionArray.searchsorted`: 

```
import pandas as pd
import numpy as np

arr = pd.array(np.arange(10**6), dtype="int64[pyarrow]")

%timeit arr.searchsorted(500)

# 367 ms ± 2.52 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)         <- main
# 21.3 µs ± 1.18 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)  <- PR
```

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

Comments:
Thanks @lukemanley
TST: Add test_ to four tests in test_readlines.py and fix two of them
State: closed

Four tests in https://github.com/pandas-dev/pandas/blob/main/pandas/tests/io/json/test_readlines.py weren't running because they didn't have `test_` in front of their names, fixed those.

Two of those tests were not passing because the JSON data was turning booleans into 1s and 0s which was conflicting with the booleans in the compared data, so added `int` before all of the booleans in the compared data. Had detailed comments explaining this but shortened them in order to pass Flake8.

- [x] closes #50378
- [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

Comments:
tip for next time - please make a new branch, don't make a pull request from `main`
> tip for next time - please make a new branch, don't make a pull request from `main`

Thank you, your guidance is awesome, I appreciate it a lot
BUG: groupby.nth with NA values in groupings after subsetting to SeriesGroupBy
State: closed

- [x] closes #26454 (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: Groupby
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
Thanks @rhshadrach
TST: Verify isin returns consistent results for passed iterables
State: closed

Add tests to verify that the `Series` method `isin` returns consistent results when passed iterables with different dtypes. (See #50234.)

- [x] closes #50234
- [ ] [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 [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.~ (Not applicable.)
- [x] ~Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.~ (Not applicable.)


Labels:
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff
name: Needs Tests
description: Unit test(s) needed to prevent regressions

Comments:
Thx @jessica-writes-code
REF: share TimedeltaArray division code
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: Timedelta
description: Timedelta data type

Comments:
Thanks @jbrockmendel
BUG: Fix issue where df.groupby.resample.size returns wide DF instead of MultiIndex Series.
State: closed

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


Labels:
name: Groupby

Comments:
Thanks @dicristina
CLN, TST: clean up and increase coverage in tslib.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: Datetime
description: Datetime data dtype
name: Clean

Comments:
Thanks @MarcoGorelli
BUG: Series(pyarrow-backed).round raising AttributeError
State: closed

- [ ] [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.0.0.rst` file if fixing a bug or adding a new feature.

Adding `ArrowExtensionArray.round` to fix the following:

```
import pandas as pd

pd.Series([1.23], dtype="float64[pyarrow]").round(1)

# AttributeError: 'ArrowExtensionArray' object has no attribute 'round'
```

Labels:
name: Arrow
description: pyarrow functionality

Comments:
Thanks @lukemanley
TST: Make get_array smarter to work for masked arrays
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 should work ootb when testing with masked arrays

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

Comments:
Thanks @phofl
ENH: Add lazy copy to align
State: closed

- [ ] xref #49473 (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:
Whatsnew entry?
We did not add entries for any of those, but can discuss this maybe in the next dev call and then add all at once?
Sounds good. IMO I think we should add an entry for these methods that get a CoW benefit 
Sounds good to me, we should also add a whatsnew in 1.5.0 explaining how to try it out. I’ll make prs for this in the coming days after compiling the prs that were already merged
Thanks @phofl
ENH: Add lazy copy for drop duplicates
State: closed

- [ ] xref #49473 (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.



The series case will work after #50429

Labels:
name: Copy / view semantics

Comments:
Thanks @phofl
BUG: Series(strings).astype("float64[pyarrow]") raising
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/v2.0.0.rst` file if fixing a bug or adding a new feature.


Fixes the following:

```
import pandas as pd

ser = pd.Series(["1.0"])
ser.astype("float64[pyarrow]")  # -> ArrowInvalid: Could not convert '1.0' with type str: tried to convert to double
```

Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Arrow
description: pyarrow functionality

Comments:
Thanks @lukemanley
ENH: Use lazy copy for dropna
State: closed

- [ ] xref #49473 (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:
Same as align, did not add notes for any of those already merged
ENH: Use lazy copy in infer objects
State: closed

- [ ] xref #49473 (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:
@jorisvandenbossche This is somehow tricky to set up because we are splitting the blocks under the hood so there is no option to check if they are the same as the initial blocks. I pushed the reference tracking down to the block level, to make it work for now
ENH: Use cow for reindex_like
State: closed

- [ ] xref #49473 (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:
Thanks @phofl
"Backport PR #50145 on branch 1.5.x (DOC restructure contributing environment guide)"
State: closed

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


Labels:

Comments:
need to backport some others first
BUG: Period constructor raises instead of ignoring when passing a string with extra precision(pico, femto, etc.)
State: closed

- [ ] xref #50149 (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: Period
description: Period data type

Comments:
Honestly, it might be worth to kill ``parse_time_string`` entirely. It seems like it is only used for Period, and some DatetimeIndex str slicing logic.

@MarcoGorelli interested?
I'll take a look, thanks for the ping!
ping @jbrockmendel 
thanks @lithomas1
CLN: Use exclusions in determination of _selected_obj
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.

Toward #46944.

Currently we use whether a grouping is in-axis or not to determine if it should make it into `_selected_obj`. This is almost the same as using `exclusions`, except for a TimeGrouper. Here, the grouping data may arise from a column and hence should be excluded, however the grouping data is not the column itself but rather derived from the column, so it is not technically in-axis. Such columns should not make it into `_selected_obj`, so we should prefer using excluded directly rather than in-axis.

This does not change the behavior of Resampler because Resampler is a subclass of BaseGroupBy which does not have the selection context.

Labels:
name: Groupby
name: Clean

Comments:
Possibly related #46944 
Right - some of the next steps include moving the group selection context to BaseGroupBy and using `_selected_obj` within the context in Resampler instead of `_obj_with_exclusions`
Thanks @rhshadrach