BrandonFors/pandas-github-issues huggingface dataset:
DEPR offsets: rename ‘BY’ to ‘BYE'
State: closed

xref #55792

Deprecated the alias denoting business year end frequency `'BY’` for offsets in favour of `'BYE'`.
Renamed strings 'BY-DEC', 'BY-JAN', etc. denoting business yearly frequencies with various fiscal quarter ends to 'BYE-DEC', 'BYE-JAN', etc.

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

Comments:
@MarcoGorelli, could you please take a look at this PR?
TST: better exception messages with na_values and pyarrow engine
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: IO CSV
description: read_csv, to_csv
name: Arrow
description: pyarrow functionality

Comments:
Thanks @jbrockmendel
PERF: get_dummies
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.2.0.rst` file if fixing a bug or adding a new feature.

```
from asv_bench.benchmarks.reshape import GetDummies

b = GetDummies()
b.setup()

%timeit b.time_get_dummies_1d()

# 106 ms ± 4.77 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)  <- main
# 17 ms ± 1.58 ms per loop (mean ± std. dev. of 7 runs, 10 loops each)   <- PR
```

Labels:
name: Performance
description: Memory or execution speed performance
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
Nice thanks @lukemanley
TST: Clean pytest fixtures
State: closed

* Move sparsely used fixtures to where they are used (in the file or inlined)
* Removed fixtures that had no use in `conftest.py` files

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

Comments:
if you're on fixture patrol, we have a couple of 

```
pytestmark = pytest.mark.parametrize("ext", [".ods"])
pytestmark = pytest.mark.parametrize("ext", [".xlsx"])
```

that look pretty clearly wrong (not
CI: Ignore EncodingWarnings from numpy
State: closed

e.g. https://github.com/pandas-dev/pandas/actions/runs/6934928557/job/18864048556

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: CI
description: Continuous Integration
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
thx @mroeschke
CI: Test clipboard on Linux via pyqt
State: closed

closes https://github.com/pandas-dev/pandas/issues/52129

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO Data
description: IO issues that don't fit into a more specific label
name: CI
description: Continuous Integration

Comments:
thx @mroeschke 
I just got a segfault locally (mac) in the clipboard tests.  will keep track of it here if it recurs

update: again 2023-11-27 13:50ish
update: 2023-12-07 (forgot to record the time), 2023-12-08 13:11ish

Again 2023-12-14 17:48
Is there a particular test where is always fails at? Does this occur when you just run the tests over all of `pandas/tests`?
I don't know, current hypothesis is it involves running the tests in more than one branch at a time
Just got it again. Was running tests in a bunch of windows at the time.
TYP: tighter typing in _apply_array
State: closed

And avoid a circular import

Labels:
name: Frequency
description: DateOffsets
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
```bash
mypy.....................................................................Failed
- hook id: mypy
- duration: 80.43s
- exit code: 1

pandas/core/arrays/datetimes.py:799: error: "_apply_array" of "BaseOffset" does not return a value  [func-returns-value]
pandas/core/arrays/datetimes.py:817: error: "BaseOffset" has no attribute "normalize"  [attr-defined]
Found 2 errors in 1 file (checked 1451 source files)
```
Thanks @jbrockmendel
CoW warning mode: clean-up some TODOs
State: closed

xref https://github.com/pandas-dev/pandas/issues/56019

Going through some of the TODOs, removing a few that have been tackled in the meantime and adding some more detail to others.

Also went through every test in `pandas/tests/copy_view/test_indexing.py` and ensured that each test is correctly asserting a warning (or not), or has a TODO(CoW-warn) if that's not yet the case.

Labels:
name: Warnings
description: Warnings that appear or should be added to pandas
name: Copy / view semantics

Comments:
thx @jorisvandenbossche
PERF: Reduce Cyclomatic Complexity in sort_values()
State: closed

## Descripción del Pull Request

**Cambios Realizados:**
Realicé una refactorización en la función `sort_values()` para reducir la complejidad ciclomática y mejorar la legibilidad del código.

**Detalles Adicionales:**
- Simplifiqué la lógica utilizando operadores ternarios.
- Eliminé redundancias en la estructura del código.
- Esta refactorización no introduce cambios en la funcionalidad existente.

**Resultados Esperados:**
La finalidad de esta mejora es facilitar la comprensión y el mantenimiento del código en la función `sort_values()`. No se espera que cause problemas adicionales y se mantiene la funcionalidad actual.




Labels:

Comments:
Thanks for the PR, but it's not clear to me that these changes are more beneficial and additionally tests are failing. Going to close, but it's advisable to first open an issue to describe the issue you are trying to solve here and get buy-in from a core dev before proceeding.
PERF: Reduce Cyclomatic Complexity in _rename()
State: closed

Modularized the _rename() function to improve readability and reduce cyclomatic
complexity. Extracted code blocks into helper functions, making the code more
understandable and maintaining the original structure.

Labels:

Comments:
Thanks for the PR, but it's not clear to me that these changes are more beneficial and additionally tests are failing. Going to close, but it's advisable to first open an issue to describe the issue you are trying to solve here and get buy-in from a core dev before proceeding.
PERF: Reduce Cyclomatic Complexity in from_records()
State: closed

Modularized the from_records() function to improve readability and reduce cyclomatic
complexity. Extracted code blocks into helper functions, making the code more
understandable and maintaining the original structure.


Labels:

Comments:
pre-commit.ci autofix
Thanks for the PR, but it's not clear to me that these changes are more beneficial and additionally tests are failing. Going to close, but it's advisable to first open an issue to describe the issue you are trying to solve here and get buy-in from a core dev before proceeding.
Adjust Index specific tests for string option
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.

there are a couple of pre-cursors still open

Labels:
name: Strings
description: String extension data type and string data
name: Index
description: Related to the Index class or subclasses
name: Arrow
description: pyarrow functionality

Comments:
Thanks @phofl
TST: collect Period 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: Period
description: Period data type

Comments:
Thanks @jbrockmendel
TST: de-xfail pyarrow parser 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: IO CSV
description: read_csv, to_csv
name: Arrow
description: pyarrow functionality

Comments:
Thanks @jbrockmendel
rank function returns int64 when float64 isn't necessary
State: closed

- [ ] closes #55598
- [ ] [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.

Made a few small changes, makes it so when the parameter "method" is anything other than "average" and pct is false, the ranks returned are int64 instead of float64.

122 out of 564 tests failed due to this change, with the majority of cases the issue being:
E       Attribute "dtype" are different
E       [left]:  Int64
E       [right]: float64

That is expected due to the changes, and if this commit is in line with what was expected in the issue #55598 I can change those tests so that they pass.

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.
CI: Fix pyarrow nightly ci failure
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: CI
description: Continuous Integration
name: Arrow
description: pyarrow functionality

Comments:
Thanks @phofl
PERF: DataFrame.loc and Series.loc when key is a MultiIndex
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.2.0.rst` file if fixing a bug or adding a new feature.

Avoid hitting `MultiIndex.values` in `is_bool_indexer`. 

```
from asv_bench.benchmarks.indexing import MultiIndexing
b = MultiIndexing()
b.setup(True)
%timeit b.time_loc_multiindex(True)

# 53.3 ms ± 2.18 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)   # <- main
# 28.6 ms ± 821 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)  # <- PR
```

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

Comments:
thx @lukemanley
CoW: Add warning for replace with inplace
State: closed

xref https://github.com/pandas-dev/pandas/issues/56019

Labels:
name: Warnings
description: Warnings that appear or should be added to pandas
name: Copy / view semantics

Comments:
Are you ok with merging this so that I can adjust the others?
Yes, merge away

Op ma 20 nov. 2023 22:32 schreef Patrick Hoefler ***@***.***>:

> Are you ok with merging this so that I can adjust the others?
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/56060#issuecomment-1819835567>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAHZEUBOTYPH4XHTM4MRQLDYFPD7LAVCNFSM6AAAAAA7RZMGT2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQMJZHAZTKNJWG4>
> .
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
TST: Make test_user_agent run in CI
State: closed

Renames `test_user_agent.py` to more generically `test_http_headers.py` and uses the `httpserver` to make this test more reliably run in the CI

Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO Network
description: Local or Cloud (AWS, GCS, etc.) IO Issues

Comments:
Tests are passing so merging. Happy to follow up if needed
TST: de-xfail pyarrow parser 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: IO CSV
description: read_csv, to_csv
name: Arrow
description: pyarrow functionality

Comments:
```bash
  /home/runner/work/pandas/pandas/pandas/_testing/_warnings.py:153:55 - error: "Never" is not iterable (reportGeneralTypeIssues)
/home/runner/work/pandas/pandas/pandas/_testing/asserters.py
```
Thanks @jbrockmendel
DEPR: Deprecate empty bool indexer for Index
State: closed

- [ ] closes #55820 (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: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Deprecate
description: Functionality to remove in pandas

Comments:
(small side note: can you use "DEPR" instead of "DEP", that's what is most often used I think, and also has less possible confusing with "dependencies")
Thanks @phofl
DEPR: Deprecate Series.view
State: closed

- [ ] closes #20251 (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: Deprecate
description: Functionality to remove in pandas

Comments:
Updated
Any idea why the annoying validate docstring thing is going crazy as soon as I touch the Series.view example?

cc @MarcoGorelli maybe?
I'll take a look tomorrow, but there is a check to verify that it has an example
Yeah that makes sense but I see tons of unrelated errors, that's what's confusing me, not super urgent, thx
DEPR: Deprecate ravel
State: closed

- [ ] closes #52511 (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: Deprecate
description: Functionality to remove in pandas

Comments:
Thanks!
BUG: nanoseconds and reso in dateutil paths
State: closed

- [x] closes #55737 (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.

Perf impact is pretty negligible compared to the cost of going through dateutil:

```
import pandas as pd
import numpy as np

dtstr = "2016/01/02 03:04:05.001000 UTC"

%timeit pd.Timestamp(dtstr)
100 µs ± 3.05 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)  # <- PR
109 µs ± 10.1 µs per loop (mean ± std. dev. of 7 runs, 10,000 loops each)  # <- main

vals = np.array([dtstr] * 10**5, dtype=object)
%timeit pd.to_datetime(vals)
8.37 ms ± 134 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <- PR
9.1 ms ± 597 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <- main

%timeit pd.to_datetime(vals, format="mixed")
8.29 ms ± 236 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <- PR
8.13 ms ± 63.6 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)  # <- main
```


Labels:
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @jbrockmendel
DEPR offsets: rename 'SM' to 'SME'
State: closed

xref #52064

Deprecated the alias denoting semi month end frequency ’SM’ for offsets in favour of ‘SME'

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

Comments:
@MarcoGorelli, could you please take a look at this PR? I think ci failures are unrelated to my changes.
PERF/REF: Construct series faster in numba apply
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 also gets rid of the usage of the deprecated fastpath argument.

In the no-op case (e.g. the UDF is ``lambda x: x``), we go from 300ms to 200ms.


Labels:
name: Performance
description: Memory or execution speed performance
name: numba
description: numba-accelerated operations

Comments:
Thanks @lithomas1
BUG: read_csv not respecting object dtype when option is set
State: closed

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

Labels:
name: IO CSV
description: read_csv, to_csv

Comments:
Can we get this one in?
cc @mroeschke gentle ping
Thanks @phofl
PERF: Improve conversion in read_csv when string option is set
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

The finalise does the conversion, but this might make us roundtrip

Labels:
name: IO CSV
description: read_csv, to_csv

Comments:
Can we get this one in?
Thanks @phofl