BrandonFors/pandas-github-issues huggingface dataset:
DEPR: numeric_only default in resampler ops
State: closed

Part of #46560

- [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: Resample
description: resample method
name: Deprecate
description: Functionality to remove in pandas
name: Nuisance Columns
description: Identifying/Dropping nuisance columns in reductions, groupby.add, DataFrame.apply

Comments:
thanks @rhshadrach
CLN: Simplify mmap code
State: closed

The mmap wrapper in pandas/io/common.py had CSV c-engine specific behavior: if mmap is used and encoding="utf-8", then the c-engine can cope with bytes (no need to decode the bytes to str). When pushing this edge case into the c-engine, we can simplify the mmap wrapper a lot!

Labels:
name: Refactor
description: Internal refactoring of code
name: IO CSV
description: read_csv, to_csv

Comments:
thanks @twoertwein very nice
Test Case: pd.DataFrame.prob with min_count changes dtype if result contains NaNs  
State: closed

- [ ] closes #47091 
- [ ] [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 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:
Hi @jreback

This PR is about to add test cases for pd.prob -  https://github.com/pandas-dev/pandas/pull/47091#issuecomment-1140514302
thanks @weikhor very nice!
BUG: do not suppress errors when closing file handles
State: closed

Wait for #47153 to be merged (fails on main otherwise). Closes #47136 and should be backported https://github.com/pandas-dev/pandas/pull/47153#discussion_r884156873

Labels:
name: IO Data
description: IO issues that don't fit into a more specific label
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
@simonjayhawkins green
thanks @twoertwein 
@meeseeksdev backport 1.4.x
Could not push to auto-backport-of-pr-47165-on-1.4.x due to error, aborting.
DOC: how to_datetime %S differs from strptime
State: closed

If any other changes are required please let me know.

- [ ] closes #47134  (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 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: Stale

Comments:
Hello @MaruthiKo! Thanks for opening this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:

* In the file [`pandas/core/tools/datetimes.py`](https://github.com/pandas-dev/pandas/blob/e26b3e2e130f28f10e67304c03d6582e79912441/pandas/core/tools/datetimes.py):

> [Line 776:68](https://github.com/pandas-dev/pandas/blob/e26b3e2e130f28f10e67304c03d6582e79912441/pandas/core/tools/datetimes.py#L776): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 778:27](https://github.com/pandas-dev/pandas/blob/e26b3e2e130f28f10e67304c03d6582e79912441/pandas/core/tools/datetimes.py#L778): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 780:54](https://github.com/pandas-dev/pandas/blob/e26b3e2e130f28f10e67304c03d6582e79912441/pandas/core/tools/datetimes.py#L780): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace


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.
Closing as stale. Please let us know if you want to continue workion this and add the examples @MaruthiKo 
> Closing as stale. Please let us know if you want to continue workion this and add the examples @MaruthiKo 

Carry on, I have not found any other examples to add on
No worries, thanks anyway for your PR
ENH: implement Timedelta._as_unit
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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


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

Comments:
> So _as_unit will be used separately from _as_reso in the future?

Yes _as_unit is the one that will eventually be user-facing.  Just didnt want to make it public yet in case we want to change the name
BUG 1.4: do not suppress errors when closing file handles
State: closed

xref https://github.com/pandas-dev/pandas/pull/47153#discussion_r884156873, closes https://github.com/pandas-dev/pandas/issues/47136

Labels:
name: IO Data
description: IO issues that don't fit into a more specific label
name: Error Reporting
description: Incorrect or improved errors from pandas

Comments:
> @twoertwein can you open against main instead and we will merge this first, then merge main on the other PR

These changes will fail on main because `_BytesTarFile` was causing errors. I'm not entirely sure why, maybe `super().close()` will call close on both superclasses which then caused a ValueError.
right. so this PR is effectively a manual partial backport of https://github.com/pandas-dev/pandas/pull/47153 (opened prematurely) and not broken off from #47153

I suppose that's OK (although not how we normally do things) if there are other issues on main.

the other PR should be merged first then?
> right. so this PR is effectively a manual partial backport of #47153 (opened prematurely) and not broken off from #47153

#47153 also de-duplicates the write buffer across `_BytesTarFile` and `_BytesZipFile` which is technically not needed for this bug.

> the other PR should be merged first then?

When seeing it as a backport, it would make sense to merge the other one first.
maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged
> maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

I removed the bug fix in #47153
> maybe a cleaner option: I do not remove the try-catch in #47153 (just fix the underlying bug+cleanup), open this PR against main after #47153 is merged

sgtm
Closing this one as I don't know how to change the target branch. Opened #47165.
TST: Re-enable test after Cython upgrade
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 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:
@meeseeksdev backport 1.4.x
thanks @lithomas1 
Could not push to auto-backport-of-pr-47159-on-1.4.x due to error, aborting.
Allow reading SAS files from archives
State: closed

- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added 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 SAS
description: SAS: read_sas

Comments:
cc @bashtage @twoertwein if any comments
Thanks @jonashaag
CLN: Share code between _BytesTarFile and _BytesZipFile
State: closed

- [x] xref #47136
- [x] [Tests added and passed]
- [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.

Needs some more work (test case + whatsnew) but want to first check whether the CI is happy. `_BytesTarFile` caused ValueErrors (due to inheriting from two IO classes?).

Would also like to further clean up `_BytesTarFile` and `_BytesZipFile` but that might be a separate PR.

Labels:
name: Refactor
description: Internal refactoring of code
name: IO Data
description: IO issues that don't fit into a more specific label
name: Clean

Comments:
Will submit a bug-fix after this PR is merged.
can you add some minimal testing for this & whatsnew note
> ok let's merge this, then do the appropriate backport (also prob need a whats new for 1.5 / different one for 1.4.3)

It fixed a bug in the not-yet-released tar feature. Does this need a whatsnew "even better tar support ;)"?

Will add a test.
right the note is about the propagating closing errors (don't need anything for changes on unrejeased)
> right the note is about the propagating closing errors (don't need anything for changes on unrejeased)

I changed this PR to still catch the error (if used within `get_handle`, the test calls the class directly). A follow-up PR (for main+1.4) will then remove the try-catch. See https://github.com/pandas-dev/pandas/pull/47160#issuecomment-1140451661
> I changed this PR to still catch the error

should probably update title.
> > I changed this PR to still catch the error
> 
> should probably update title.

@twoertwein can you do this and then merge when ready.
Backport PR #47150 on branch 1.4.x (DEPS: Bump Cython)
State: closed

Backport PR #47150: DEPS: Bump Cython

Labels:
name: CI
description: Continuous Integration
name: Dependencies
description: Required and optional dependencies

Comments:
Numpy Dev failing with `RuntimeError: Cannot cythonize with old Cython version (0.29.24 installed, needs 0.29.30)`. we perhaps are missing a backport somewhere?

> Numpy Dev failing with `RuntimeError: Cannot cythonize with old Cython version (0.29.24 installed, needs 0.29.30)`. we perhaps are missing a backport somewhere?

https://github.com/pandas-dev/pandas/pull/46029 was not backported.

can either backport that one or change the cython version in ci/deps/actions-310-numpydev.yaml here?
> can either backport that one or change the cython version in ci/deps/actions-310-numpydev.yaml here?

looking through the code changes in that PR, probably safer just to change to 0.29.30 in actions-310-numpydev.yaml here and if there is another patch release in 1.4.x we could decide to add Cython 3 support later if deemed necessary. (or just wait for 1.5)
Numpy Dev green. other jobs passed on last run. so merging.
ENH: Move SettingWithCopyError to error/__init__.py per GH27656
State: closed

- [x] xref #27656. this GitHub issue is being done in multiple parts
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added an entry in the latest `doc/source/whatsnew/v1.5.0.rst` file if fixing a bug or adding a new feature.

I saw instances of `SettingWithCopyException` and replaced them with `SettingWithCopyError` as I think that was the old name


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

Comments:
Nice keep them coming! And thanks for catching the documentation error
DEPS: Bump Cython
State: closed

- [ ] xref #41935 (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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.

Remember to also merge MacPython/pandas-wheels#181 too (I would recommend against merging this if you don't have write perms there as well, as we merge these too at the same time ideally).

Labels:
name: CI
description: Continuous Integration
name: Dependencies
description: Required and optional dependencies

Comments:
thanks @lithomas1 
@meeseeksdev backport 1.4.x
Could not push to auto-backport-of-pr-47150-on-1.4.x due to error, aborting.
> Remember to also merge [MacPython/pandas-wheels#181](https://github.com/MacPython/pandas-wheels/pull/181) too (I would recommend against merging this if you don't have write perms there as well, as we merge these too at the same time ideally).

do we need to update the pandas-feedstock for the conda packages? https://github.com/conda-forge/pandas-feedstock/pull/134 recently updated `cython >=0.29.16` to `cython >=0.29.24,<3`
> Remember to also merge [MacPython/pandas-wheels#181](https://github.com/MacPython/pandas-wheels/pull/181) too

that PR closed #41935

test_read_csv_and_table_sys_setprofile is still skipped?


> do we need to update the pandas-feedstock for the conda packages? [conda-forge/pandas-feedstock#134](https://github.com/conda-forge/pandas-feedstock/pull/134) recently updated `cython >=0.29.16` to `cython >=0.29.24,<3`

This should be done whenever 1.4.3 comes out.

> test_read_csv_and_table_sys_setprofile is still skipped?

Thanks for the reminder, will update.
Properly propagate exceptions in sas.pyx
State: closed

- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [x] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [x] Added 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
name: IO SAS
description: SAS: read_sas

Comments:
thanks @jonashaag
TYP: Upgrade mypy to 0.960
State: closed

- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Looks like this passed out of the box

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

Comments:
how old is 0.96?
3 days, why?
> how old is 0.96?

mypy aims to have a monthly release cycle
> Can you also update the mypy version in https://github.com/pandas-dev/pandas/blob/main/doc/source/whatsnew/v1.5.0.rst

done
Thank you @phofl
REGR: index_col False and header=None inferring index names in some cases
State: closed

- [x] closes #46955 (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.

The c engine raises as before.

Labels:
name: Regression
description: Functionality that used to work in a prior pandas version
name: IO CSV
description: read_csv, to_csv

Comments:
thanks @phofl great as always
@meeseeksdev backport 1.4.x
Could not push to auto-backport-of-pr-47139-on-1.4.x due to error, aborting.
CLN: ensure clean up styler tests
State: closed

should be back ported

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

Comments:
@meeseeksdev backport 1.4.x
thanks @attack68 
Could not push to auto-backport-of-pr-47135-on-1.4.x due to error, aborting.
Hey @attack68 

Could you please drop me an email at <NAME><SURNAME> at protonmail . com ? Or add me on LinkedIn and contact me there?
infer_freq handle non-nano
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 an entry in the latest `doc/source/whatsnew/vX.X.X.rst` file if fixing a bug or adding a new feature.


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

Comments:
Thanks @jbrockmendel
Backport PR #46636 on branch 1.4.x (REGR: Replace changes the dtype of other columns)
State: closed

Backport PR #46636: REGR: Replace changes the dtype of other columns

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

Comments:
https://github.com/pandas-dev/pandas/runs/6601303140?check_suite_focus=true

failing on numpy_dev but unrealted
sync "inplace" document strings anywhere possible
State: closed

- [x] closes #47030 
- [ ] [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 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 @eshirvana
BUG: read_excel loading some xlsx ints as floats
State: closed

- [x] closes #46988
- [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/v1.4.3.rst` file


Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Regression
description: Functionality that used to work in a prior pandas version
name: IO Excel
description: read_excel, to_excel

Comments:
Thanks @ahawryluk 
Owee, I'm MrMeeseeks, Look at me.

There seem to be a conflict, please backport manually. Here are approximate instructions:

1. Checkout backport branch and update it.

```
git checkout 1.4.x
git pull
```

2. Cherry pick the first parent branch of the this PR on top of the older branch:
```
git cherry-pick -x -m1 dea624a0075d595def179b96be27560cf6257438
```

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

```
git commit -am 'Backport PR #47121: BUG: read_excel loading some xlsx ints as floats'
```

4. Push to a named branch:

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

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

> "Backport PR #47121 on branch 1.4.x (BUG: read_excel loading some xlsx ints as floats)"

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).
Changes as requested in #47058
State: closed

This is my first open-source contribution. Please let me know if there are any mistakes, will rectify them

- [ ] closes #47058 (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 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:
Hello @MaruthiKo! Thanks for updating this PR. We checked the lines you've touched for [PEP 8](https://www.python.org/dev/peps/pep-0008) issues, and found:



There are currently no PEP 8 issues detected in this Pull Request. Cheers! :beers: 

##### Comment last updated at 2022-05-25 20:37:42 UTC
Awesome thanks @MaruthiKo and welcome to pandas & open source!
> Awesome thanks @MaruthiKo and welcome to pandas & open source!

Thank you so much, it would not be possible without your help!
Fix reading SAS7BDAT files with zero rows
State: closed

- [x] closes #18198 (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: Bug
name: IO SAS
description: SAS: read_sas

Comments:
cc @bashtage  if you can look 
Looks correct and good to me.

Thanks @jonashaag
Fix reading some RDC compressed pages
State: closed

- [x] closes #35545 (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 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 SAS
description: SAS: read_sas

Comments:
Waiting for OK in #35545 to add test case
See eg https://github.com/Roche/pyreadstat/blob/d49e57e067d2a2b126f619f1eafa38e1e6b15a76/src/sas/readstat_sas7bdat_read.c#L914
can you rebase
thanks @jonashaag