BrandonFors/pandas-github-issues huggingface dataset:
DOC: added copy functionality in code blocks
State: closed

Hi, I was going through the docs and thought it would be convenient to have a copy button in the code blocks. So I tried to add it and it works fine. If this is something you'd want as well then, I'll continue to work on this further to make it more reusable and clean. Please let me know what you think. Thank you. 

(I've downloaded the icon from https://uxwing.com/copy-icon/, which states that _" License: All icons are free to use any personal and commercial projects without any attribution or credit. "_  )

- [ ] closes #xxxx (Replace xxxx with the Github issue number)
- [ ] [Tests added and passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#writing-tests) if fixing a bug or adding a new feature
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).
- [ ] Added 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 for the pull request. While this does sounds like a good idea, I don't think maintaining custom HTML & JS code is the best approach.

Since the pandas docs uses sphinx, a copy feature through an extension like this one would be better. https://sphinx-copybutton.readthedocs.io/en/latest/
Sure, would you want me to give `sphinx-copybutton` a try? 
> Sure, would you want me to give `sphinx-copybutton` a try?

Sure, that would be great.
Hello @Meghana-12! 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-07-01 14:36:08 UTC
Do I have to add the `sphinx-copybutton` to dependencies in the `environment.yml` file as well?
> Do I have to add the `sphinx-copybutton` to dependencies in the `environment.yml` file as well?

yes exactly
@Meghana-12 do you have time to add the missing dependency, and build the docs to see everything is working as expected?
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.

If you need assistance in building the documentation, here's a guide: https://pandas.pydata.org/docs/development/contributing_documentation.html#how-to-build-the-pandas-documentation
Fix SAS 0x40 control byte handling and column name parsing
State: closed

- [x] closes #31243 (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:
See https://github.com/Roche/pyreadstat/blob/b8efa675af9a7af703d4c411de768a2053e94d64/src/sas/readstat_sas_rle.c#L65-L67
Hello @jonashaag! 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-06-15 20:39:47 UTC
we don't have an explict test file for this that repros?
Oh wow, thanks for checking, this must have gone lost during a rebase.
@jreback
@jreback 
Thanks @jonashaag
BUG Avoid IndexError on writing empty (row) MI df to excel (GH19543)
State: closed

- [x] closes #19543 
- [x] Tests added and passed
- [x] All code checks passed
- [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 Excel
description: read_excel, to_excel
name: MultiIndex

Comments:
Hello @wf-r! 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-06-15 05:14:21 UTC
@github-actions pre-commit

@github-actions pre-commit
@phofl Thanks for your feedback, I think you can take another look.
Thanks @wf-r
astype_overflowsafe handle timedelta64
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

Comments:
Thanks @jbrockmendel
make series axis parameter docs consistent
State: closed

- [x] closes #47100
- [x] closes #45969 
- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).


Labels:
name: Docs

Comments:
Hello @jackgoldsmith4! 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-27 13:12:39 UTC
The one check that's failing seems to be unrelated: https://github.com/codecov/codecov-action/issues/745
Thanks @jackgoldsmith4
Convert ExtensionDtype class objects to instances of that class
State: closed

- [x] closes #31356, closes #45417
- [ ] [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.

This enables behavior that would previously raise (and often confuse), e.g :

```python
pd.Series(["a", "b"], dtype=pd.StringDtype)
pd.api.types.is_bool_dtype(pd.BooleanDtype) == True
```

Labels:
name: Stale

Comments:
Ahh, thanks for the clarification. I must have misread https://github.com/pandas-dev/pandas/issues/45417#issuecomment-1014738149 to mean that the changes here were desirable.

Just to confirm (please correct as needed):

- Passing a class obj to `pandas_dtype`, `is_*_type`, etc. should always raise.
- https://github.com/pandas-dev/pandas/issues/45417 should be marked "it's a feature" and closed
- This PR should close https://github.com/pandas-dev/pandas/issues/31356 by raising a more informative message (with tests to confirm)
yep that sounds right
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.
BUG Fix: Cannot read pickle generate_legacy_storage_files version 1.4.2 under environment pandas version 1.5.0 (incompatibilites issue)
State: closed

- [x] closes #47090
- [ ] [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 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 Pickle
description: read_pickle, to_pickle
name: Non-Nano
description: datetime64/timedelta64 with non-nanosecond resolution

Comments:
Thanks @weikhor
Fix SAS7BDAT run-length encoding formula
State: closed

Run across an error/simplification? of a RLE formula in the SAS7BDAT parser. The original code https://bitbucket.org/jaredhobbs/sas7bdat/src/18cbd14407918c1aa90f136c1d6c5d83f307dba0/sas7bdat.py#lines-110:114 has the correct formula. I am not sure why we have another version.

Unfortunately I do not know how to add a regression test. The SAS file that reproduces the issue is proprietary, as is the SAS7BDAT file format, and I'm not aware of any means of creating a SAS file.

- [ ] 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).
- [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:
Similar case here https://github.com/pandas-dev/pandas/issues/31243#issuecomment-686386759
pyreadstat has the same logic https://github.com/Roche/pyreadstat/blob/master/src/sas/readstat_sas_rle.c#L62-L63
See my note above about a test case. Can add a what’s new 
Unfortunately all (shareable) test files I've seen so far, including the ones in pyreadstat, don't  reproduce the bug.
A user provided an example SAS file in #44216. Could be helpful, if this SAS file triggers the error you fixed.
Unfortunately both of the files do not reproduce the bug
cc @bashtage WDYT?
Would be good to have a file that requires this offset Is it possible to create one?
@bashtage Unfortunately I don't have a file that I can share and pyreadstat can't write SAS7BDAT files. Do you have any ideas where to get such a file?
@bashtage came up with a test file by zeroing almost all of the bytes of a real world file. PR now depends on https://github.com/pandas-dev/pandas/pull/47154
> @bashtage came up with a test file by zeroing almost all of the bytes of a real world file. PR now depends on #47154

Once that is in rebase and then should be good. 
LGTM.
Hello @jonashaag! 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-07-02 16:18:30 UTC
@jreback @mroeschke mind reviewing this?
Thanks @jonashaag 
Thanks :)
fix pandas.show_versions() and remove pin for setuptools
State: closed

closes #44980

labelled as 1.4.3 as seeing failures on release checks

(strange I cannot reproduce issue on editable install on 1.4.x or main)

Labels:
name: Build
description: Library building on various platforms
name: Dependencies
description: Required and optional dependencies

Comments:
@meeseeksdev backport 1.4.x
DOC/CI: Use more explicit data setup in user guides
State: closed

- [x] All [code checks passed](https://pandas.pydata.org/pandas-docs/dev/development/contributing_codebase.html#pre-commit).

Should fix the current CI failure for the docbuild.

* Use more explicit setup in `io.rst` instead of files / `:suppress:`
* Remove some static files that are no longer needed after refactor

Also fixes CI failure in the Np Dev build

Labels:
name: Docs
name: CI
description: Continuous Integration

Comments:
@jreback all green
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 339623b58abda42907f3090769d07c663e74a796
```

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

```
git commit -am 'Backport PR #47093: DOC/CI: Use more explicit data setup in user guides'
```

4. Push to a named branch:

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

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

> "Backport PR #47093 on branch 1.4.x (DOC/CI: Use more explicit data setup in user guides)"

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).
                
@meeseeksdev backport 1.4.x
Owee, I'm MrMeeseeks, Look at me.

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

1. Checkout backport branch and update it.

```
git checkout 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 339623b58abda42907f3090769d07c663e74a796
```

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

```
git commit -am 'Backport PR #47093: DOC/CI: Use more explicit data setup in user guides'
```

4. Push to a named branch:

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

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

> "Backport PR #47093 on branch 1.4.x (DOC/CI: Use more explicit data setup in user guides)"

And apply the correct labels and milestones.

Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon!

Remember to remove the `Still Needs Manual Backport` label once the PR gets merged.

If these instructions are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
Bug Fix: pd.DataFrame.sum with min_count changes dtype if result contains NaNs
State: closed

- [ ] closes #46947
- [ ] [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: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Reduction Operations
description: sum, mean, min, max, etc.

Comments:
Hello @weikhor! 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-29 14:33:58 UTC
thanks @weikhor very nice. can you add similar tests for `.prod()` (which i think should just work).
ENH: move SpecificationError to error/__init__.py 
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.


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

Comments:
Thanks for your continued work on this!
> Thanks for your continued work on this!

Happy to help! Thank you for taking a look and the commit help
TST: Added test for bug Reindexing pd.Float64Dtype() series gives runtime warnings when passed to np.log 
State: closed

- [x] closes #47055 
- [x] [Tests added and passed] if fixing a bug or adding a new feature
- [x] All [code checks passed]
- [ ] 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: Warnings
description: Warnings that appear or should be added to pandas

Comments:
Thanks @MiloniAtal
BUG: Eval scopes ignoring empty dictionaries (#47084)
State: closed

closes  [#47084](https://github.com/pandas-dev/pandas/issues/47084)

- [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: expressions
description: pd.eval, query

Comments:
Hello @Alex-Blade! 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-06-04 10:38:38 UTC
looks ok, need to do precommit here (line length). can you add a whatsnew note for this.
@github-actions pre-commit
@jreback, to be honest, I don't really get how should I name the entry in the `_whatsnew_150.bug_fixes` section. Some of them are named according to classnames (`Categorical` - Bug in `Categorical.view`). Others imply an action during which users may encounter the bug (`Indexing` - Bug in `loc.__getitem__`). Is there a list of predefined sections perhaps?
UPD. Rebased and made an entry in Other section, by analogy with similar bug-fixes from previous versions 
@jreback, mind looking at it again?
> @jreback, mind looking at it again?

@Alex-Blade ci is failing. reviewers (other than Jeff) are more likely to review PRs with green ci.

code checks and some pytables tests are failing.

@jreback since the issue suggested this as being an security concern, would we consider this for 1.4.x (once ci is green)?
see here: https://github.com/pandas-dev/pandas/runs/6660273116?check_suite_focus=true

looks like the precommit is failing
@github-actions pre-commit
Seems like Numpy Dev died by an accident on setup-miniconda stage
These tests are painful... Two times they died because of numpy, and now a timeout...

@simonjayhawkins, it has passed the tests a few times in a row, I think it can be considered as ready
thanks @Alex-Blade very nice!
@meeseeksdev backport 1.4.x
Could not push to auto-backport-of-pr-47085-on-1.4.x due to error, aborting.
BUG: Fix `set_sticky` background
State: closed

- [x] closes #46984 (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.

Inherit the `background-color` of the sticky elements from its parents (with proper color alternation between rows) instead of hard-coding it to white. 

Example: 

```py
import pandas as pd
import numpy as np

pd.DataFrame(np.random.randn(16, 100)).style.set_sticky()
```

| Dark | Light |
| -- | -- |
| <img width="465" alt="image" src="https://user-images.githubusercontent.com/6421097/169643245-68b071c4-bdff-4813-9537-8eba341570f3.png"> | <img width="404" alt="image" src="https://user-images.githubusercontent.com/6421097/169643388-3ea02bcc-729d-43d9-a0df-1fe7fccb8459.png"> |


For reference, https://github.com/pandas-dev/pandas/issues/42072 introduced the `set_sticky` feature. 


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

Comments:
cc @attack68 
This is the best solution. LGTM
LGTM, failure unrelated. Needs approval from @jreback to merge.
Thanks @ShawnZhong 
I think this PR introduced a bit of a regression since it makes the background of the sticky row/column transparent, which makes it harder to read once you scroll to right/down.

You can see the behaviour in the current docuemntation
https://pandas.pydata.org/docs/user_guide/style.html#Sticky-Headers
I think regression is too strong a word for this item, but generally I agree. The underlying issue was reopened and remains outstanding.
DOC: Fix assorted doc warnings
State: closed

Part of #44642

- [ ] [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 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 @rhshadrach
REGR: Raise NotImplementedError for agg with axis=1 and multiple funcs
State: closed

- [x] closes #46995 (Replace xxxx with the Github issue number)
- [x] closes #46904
- [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: Groupby
name: Regression
description: Functionality that used to work in a prior pandas version
name: Resample
description: resample method
name: Apply
description: Apply, Aggregate, Transform, Map
name: Window
description: rolling, ewma, expanding

Comments:
Hello @rhshadrach! 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-21 02:33:52 UTC
thanks @rhshadrach 
@meeseeksdev backport 1.4.x
Could not push to auto-backport-of-pr-47078-on-1.4.x due to error, aborting.
CI: mypy&pyright in manual pre-commit stage
State: closed

xref https://github.com/pandas-dev/pandas/pull/47067#discussion_r877610624

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

Comments:
> Looks great! Looks like there's an unrelated failure on master which prevented this from being run. Do you have a run where this executed?

I had a run, but then I rebased&force pushed :( Happy to wait until the doc-issue is fixed.
I rebased but removed #47018 should hopefully work now
> I rebased but removed #47018 should hopefully work now

Seems like there is another doc issue. I included the commit again. I'll rebase when main is green.
Sweet thanks @twoertwein! Yeah this should be fine despite the failure on main