BrandonFors/pandas-github-issues huggingface dataset:
BUG: Empty DataFrame constructor dtype
State: closed

- [x] closes #56679 (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: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Stale

Comments:
@rhshadrach is there an issue for this?
Updated the OP @simonjayhawkins 
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.
Clarify on_bad_lines PyArrow in read_csv
State: closed

Mention `invalid_row_handler` explicitly

- ~~[ ] 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.~~

Related to #58662

Labels:
name: Docs
name: IO CSV
description: read_csv, to_csv

Comments:
Thanks @wjandrea
BUG: DatetimeIndex.is_year_start breaks on custom business days frequencies bigger then `1C`
State: closed

- [x] closes #58664
- [x] Tests added and passed
- [x] Added an entry in the latest `doc/source/whatsnew/v3.0.0.rst


Labels:
name: Bug
name: Frequency
description: DateOffsets

Comments:
this needs rebasing, as it contains commits from the other PR (and could you move the whatsnew from that one to `DatetimeLike` please?)

(other than that, it looks like this identifies + fixes the issue, nice)
> this needs rebasing, as it contains commits from the other PR (and could you move the whatsnew from that one to `DatetimeLike` please?)
> 
thanks, rebased and moved the whatsnew note from `Indexing` to `DatetimeLike` 
Thanks @natmokval
DOC: Clarify allowed values for on_bad_lines in read_csv
State: closed

Move the callable options out of the version added/changed tags and improve the flow.

- ~~[ ] 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.~~

Check my work to make sure I got the details right, please. One thing is, I'm not sure if "process" is the right term for the PyArrow `invalid_row_handler` since all it does is say "skip" or "error".

BTW, `invalid_row_handler` isn't mentioned specifically, so at first I thought "signature as described in pyarrow documentation" was referring to the signature of the `ParseOptions` constructor.

Also, the description should probably state explicitly what happens when the function returns a list of strings with the right number of elements (with `engine='python'`). I haven't used it myself, but I'm inferring it gets forwarded to the parser that turns a table of strings into a dataframe.

Labels:
name: Docs

Comments:
Thanks @wjandrea
DOC: Add examples for pd.read_csv
State: closed

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


Labels:
name: Docs
name: IO CSV
description: read_csv, to_csv

Comments:
Thanks @Aloqeely
DOC: Remove deprecated delim_whitespace from user guide
State: closed

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


Labels:
name: Docs

Comments:
Thanks @Aloqeely 
Can this be backported @mroeschke?
@meeseeksdev backport 2.2.x
Awww, sorry Aloqeely you do not seem to be allowed to do that, please ask a repository maintainer.
Hmm I don't think it's super critical that this documentation is backported
It isn't critical, but if this isn't going to be backported then users viewing the stable docs won't know this option is deprecated
https://github.com/pandas-dev/pandas/issues/58488#issuecomment-2089150285
DOC: Fix typo in indexing.rst
State: closed

Fix typo in "Returning a view versus a copy" section

- [ ] 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.
- [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 @m-ahmadi 
I think the same typo is on main. @m-ahmadi fancy opening another PR?

(@mroeschke the milestone here needs changing?)
Ah thanks changed the milestone
Enh/transform py fallback
State: closed

- [ ] closes #49758 
- [ ] [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 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.
DOC: Enforce Numpy Docstring Validation for pandas.Series.dt.daysinmonth and pandas.Series.dt.days_in_month
State: closed

- [x] xref #58504 

fixes
```
pandas.Series.dt.daysinmonth SA01
pandas.Series.dt.days_in_month SA01
```



Labels:
name: Docs

Comments:
Thanks @tuhinsharma121
TST: Skip test_rolling_var_numerical_issues on riscv64 platforms
State: closed

The test is failing on riscv64.  The failure is reproducible under qemu and on real hardware (VisionFive 2).

Updates #38921

- [ ] 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).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


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

Comments:
Thanks @markdryan
TST: Add test for regression in `groupby` with tuples yielding MultiIndex
State: closed

- [x] closes #21340 
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests).
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Added unit test to `pandas/tests/groupby/test_grouping.py` to address GH #21340



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

Comments:
Thanks @jasonmokk
Cln/separate logic from init
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.

I'm new to the project and was trying to contribute in some way.
To do this, I ran some static analysis tools(sonarcube, pylint and flake8).
I am now aiming to improve readability and maintainability by proposing a quality improvement that involves removing code duplication and transforming it into a function.

Labels:

Comments:
Hi thanks for the suggestion, I will have a think on this. Im not convinced that this really reduces code duplication. You have taken a few one line functions and turned it into more code that still calls one line functions.

There are probably many areas which could benefit from this kind of analysis though, maybe just not here.
Hi @attack68, thank you for your reply. I understood what you said. I noticed a pattern of using lambda functions repetitively without treating them as functions in other parts of the pandas code; this is probably more of a code style to simplify things.

The two warning code pylint gave me are [C3001](https://pylint.pycqa.org/en/latest/user_guide/messages/convention/unnecessary-lambda-assignment.html) and [W0108](https://pylint.readthedocs.io/en/stable/user_guide/messages/warning/unnecessary-lambda.html).

I can define a function to be used during the initialization of the class; this approach might be cleaner than before. What do you think?
Thanks for the PR but I also agree I don't think this change is necessarily an improvement here.

Closing, but happy to have your contributions to any issue labeled `good first issue`
BUG: Fix arrow extension array assignment by repeated key
State: closed

- [x] closes #58530
- [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: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Arrow
description: pyarrow functionality

Comments:
pre-commit.ci autofix
Thanks @hombit
DOC: Enforce Numpy Docstring Validation for pandas.tseries copy methods
State: closed

- [ ] xref #58536 

fixes

```
-i "pandas.tseries.offsets.BQuarterEnd.copy SA01" \
-i "pandas.tseries.offsets.BYearBegin.copy SA01" \
-i "pandas.tseries.offsets.BYearEnd.copy SA01" \
-i "pandas.tseries.offsets.BusinessDay.copy SA01" \
-i "pandas.tseries.offsets.BusinessHour.copy SA01" \
-i "pandas.tseries.offsets.BusinessMonthBegin.copy SA01" \
-i "pandas.tseries.offsets.BusinessMonthEnd.copy SA01" \
-i "pandas.tseries.offsets.CustomBusinessDay.copy SA01" \
-i "pandas.tseries.offsets.CustomBusinessHour.copy SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthBegin.copy SA01" \
-i "pandas.tseries.offsets.CustomBusinessMonthEnd.copy SA01" \
-i "pandas.tseries.offsets.DateOffset.copy SA01" \
-i "pandas.tseries.offsets.Day.copy SA01" \
-i "pandas.tseries.offsets.Easter.copy SA01" \
-i "pandas.tseries.offsets.FY5253.copy SA01" \
-i "pandas.tseries.offsets.FY5253Quarter.copy SA01" \
-i "pandas.tseries.offsets.Hour.copy SA01" \
-i "pandas.tseries.offsets.LastWeekOfMonth.copy SA01" \
-i "pandas.tseries.offsets.Micro.copy SA01" \
-i "pandas.tseries.offsets.Milli.copy SA01" \
-i "pandas.tseries.offsets.Minute.copy SA01" \
-i "pandas.tseries.offsets.MonthBegin.copy SA01" \
-i "pandas.tseries.offsets.MonthEnd.copy SA01" \
-i "pandas.tseries.offsets.Nano.copy SA01" \
-i "pandas.tseries.offsets.QuarterBegin.copy SA01" \
-i "pandas.tseries.offsets.QuarterEnd.copy SA01" \
-i "pandas.tseries.offsets.Second.copy SA01" \
-i "pandas.tseries.offsets.SemiMonthBegin.copy SA01" \
-i "pandas.tseries.offsets.SemiMonthEnd.copy SA01" \
-i "pandas.tseries.offsets.Tick.copy SA01" \
-i "pandas.tseries.offsets.Week.copy SA01" \
-i "pandas.tseries.offsets.WeekOfMonth.copy SA01" \
-i "pandas.tseries.offsets.YearBegin.copy SA01" \
-i "pandas.tseries.offsets.YearEnd.copy SA01" \
```


Labels:
name: Docs

Comments:
Thanks @tuhinsharma121
BUG: Assignment of pyarrow arrays yield unexpected dtypes
State: closed

- [x] closes #56994 
- [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).
- [N.A.] 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/v3.0.0.rst` file if fixing a bug or adding a new feature.

During a column assignment in a `DataFrame`:
- If the column `value` is a pyarrow array (check tested with `lib.is_pyarrow_array`) `sanitize_array` sets `dtype` to `ArrowDtype(value.type)` 
- Else the standard `sanitize_array` processing are applied


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.
> 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.

I'm still working on it.
@jorisvandenbossche : Hello Joris, hope you're doing well would you have any news about [BUG: Assignment of pyarrow arrays yields unexpected dtypes](https://github.com/pandas-dev/pandas/issues/56994#top) ? Previously I was saying that "if a Series or a DataFrame is created or assigned with data dtype 'X' I would expect if it is possible, that it keeps the same 'X' dtype" but its only my humble opinion :-) and I would be equally happy to talk about it : maybe there is somewhere a discussion about how pyarrow types could be managed ? (thanks in advance !)
Friendly ping @jorisvandenbossche 
Hello @WillAyd: do you think this PR could be validated or should I have another approach ? 
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.
ENH: Totality validation for merge operation
State: closed

- [x] closes #58547
- [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/v3.0.0.rst` file if fixing a bug or adding a new feature.


Labels:

Comments:
Hmm I'm not too sure about adding this - the validation keyword strictly deals with cardinality today. This seems to blur that scope a little.

Does a library like great expectations not already have something to solve your need?
@WillAyd I would argue that adding totality has a special significance. It would enable the validation of the cardinalities defined by the [entity relationship model](https://datacadamia.com/data/type/relation/modeling/cardinality#cardinality_symbol).

This defines a clear scope for what the `validate` option's itention is and also adds compatability with the most common modeling language for merges.
Also the existing validations are useful to avoid unwanted data duplication. My validations would help avoiding unwanted data loss during merge. I think the new validations are just the complementary extension of the existing ones.
Thanks for the PR, but I am also skeptical of adding this into pandas as well. In addition, it appears the original issue has not been triaged yet so a PR is a bit early for this stage - discussion on the issue is still need regarding acceptance and implementation, so closing
BUG: Use large_string in string array consistently
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 is not user visible, since the constructor casts back, but it's unnecessary

Labels:
name: Strings
description: String extension data type and string data
name: Arrow
description: pyarrow functionality

Comments:
Thanks @phofl
DOC: shift() of boolean series gives drawdown by an order of magnitude with default filling np.NaN comparing with filling by bool like False 
State: closed

line 11715:  For numeric data, ``np.nan`` is used. ->For Boolean and numeric NumPy data types, ``np.nan`` is used.

- [ ] closes #58465
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [ ] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added [type annotations](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#type-hints) to new arguments/methods/functions.
- [ ] Added an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


Labels:
name: Docs

Comments:
Thanks @SongYeongEng
check if changing .pxd causes build issues
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:
Please open issues first before doing changes like this
TST: Add test for duplicate `by` columns in `groupby.agg` using `pd.namedAgg` and  `asIndex=False`
State: closed

- [x] closes #58446  
- [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)


This PR adds a unit test to `pandas/tests/groupby/test_groupby.py` to verify the correct functionality of `groupby.agg` when passed in `pd.NamedAgg` objects with duplicate columns in the `by` argument, and with `asIndex=False`. Addresses GH #58446.

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

Comments:
Thanks @jasonmokk
Allow StringArray[python] to be backed by numpy StringDType in numpy 2.0
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.

Just testing for CI again.

Labels:
name: Strings
description: String extension data type and string data
name: Compat
description: pandas objects compatability with Numpy or Python functions
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.
@lithomas1 do you have plans to finish this? Or ahould be close the PR?
No plans here, closing.
BUG fix where inconsistency between inplace=True and inplace=False #57083
State: closed

- [ x] closes #57083
- [ ] [Tests added and passed]
- [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:

Comments:
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.