BrandonFors/pandas-github-issues huggingface dataset:
WIP: Remove clipboard xfail
State: closed

- [x] closes #29676

Ref work done here: https://github.com/pandas-dev/pandas/pull/29712

Labels:

Comments:
Where has this been fixed?
> Where has this been fixed?

Hasn't been fixed yet - was about to start attempting to fix. Unless https://github.com/pandas-dev/pandas/pull/29712 is nearly there/ is there anything I can do to help?


Ok, I was planning to get back to that PR soon, that's why I was asking. Not sure what was the state were I left it, but I think the clipboard tests were being skipped in many cases were we thought they were running. So, I was trying to avoid any magic and be explicit on when they were being run.
> Ok, I was planning to get back to that PR soon, that's why I was asking. Not sure what was the state were I left it, but I think the clipboard tests were being skipped in many cases were we thought they were running. So, I was trying to avoid any magic and be explicit on when they were being run.

Cool if you are planning to work on it - ill close this for now. Thanks! Let me know if there is anything I can do
BLD: Fix IntervalTree build warnings
State: closed

- [X] closes #27169
- [X] closes #30365
- [X] tests added / passed
- [X] passes `black pandas`
- [X] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

xref #30366 
cc @WillAyd 



Labels:
name: Build
description: Library building on various platforms
name: Interval
description: Interval data type

Comments:
thanks @jschendel
TST: Regression testing for fixed issues
State: closed

- [x] closes #5764
- [x] closes #7883
- [x] closes #7820
- [x] closes #8720
- [x] closes #6783
- [x] closes #7072
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`


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

Comments:
Fixed one of the 32-bit failures. We may have a remaining one that I don't immediately see a fix for.

```
    def test_to_csv_timedelta_precision(self):
        # GH 6783
        s = pd.Series([1, 1]).astype("timedelta64[ns]")
        buf = io.StringIO()
        s.to_csv(buf)
        result = buf.getvalue()
        expected = ",0\n0,0 days 00:00:00.000000001\n1,0 days 00:00:00.000000001\n"
>       assert result == expected
E       AssertionError: assert ',0\r\n0,0 da...000000001\r\n' == ',0\n0,0 days...0.000000001\n'
E         - ,0

E         ?   -
E         + ,0
E         - 0,0 days 00:00:00.000000001

E         ?                            -
E         + 0,0 days 00:00:00.000000001
E         - 1,0 days 00:00:00.000000001
...
E         
E         ...Full output truncated (3 lines hidden), use '-vv' to show
```
at least one of the failures looks like a np.intp thing
Strange, on the 32-bit linux build we have

```
self = <pandas.tests.indexes.test_numeric.TestInt64Index object at 0xd35cbbcc>

    def test_get_indexer_nan(self):
        # GH 7820
        result = Index([1, 2, np.nan]).get_indexer([np.nan])
        expected = np.array([2], dtype="int64")
>       tm.assert_numpy_array_equal(result, expected)
E       AssertionError: numpy array are different
E       
E       Attribute "dtype" are different
E       [left]:  int32
E       [right]: int64
```

Does that make sense?

Still not sure about the to_csv one. We might want to drop that test / issue from the list and merge the rest.
@TomAugspurger the original 2 Windows failures are fixed with the suggestions above (tested locally)
Sorry, I missed that! Will push that up.
Thanks!
TST/BUG: fix incorrectly-passing Exception in test_html
State: closed

A `raise` is indented one indent further than it should be.  Fixing this surfaces a failing test that is fixed by decoding bytes before passing it to bs4.

Labels:
name: Bug
name: Testing
description: pandas testing functions or related to the test suite
name: IO HTML
description: read_html, to_html, Styler.apply, Styler.applymap

Comments:
gentle ping.  not a blocker, but it is a bugfix so it'd be nice to get it in for the RC
lgtm. can you rebase just in case. ping on green.
rebased+green
thanks
TYP: check_untyped_defs astype_nansafe
State: closed

```
pandas\core\arrays\integer.py:549: error: Argument "copy" to "astype_nansafe" has incompatible type "None"; expected "bool"
pandas\core\arrays\boolean.py:527: error: Argument "copy" to "astype_nansafe" has incompatible type "None"; expected "bool"
```

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

Comments:
LGTM
thanks
CLN: Update old .format to f-string
State: closed

Reviewed and updated to f-string for:
pandas/compat/pickle_compat.py
pandas/_config/config.py
pandas/core/arrays/boolean.py

- [x] Contributes to #29547 
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Marking pickle_compat.py as done but I left the existing `.format` as is, as I believe this is a good use case for `.format`

Labels:
name: Code Style
description: Code style, linting, code_checks
name: Clean

Comments:
Thanks @thepaullee
DEPR: DataFrame GroupBy indexing with single items DeprecationWarning
State: closed



- [x] closes #23566
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Groupby
name: Deprecate
description: Functionality to remove in pandas

Comments:
theres another FutureWarning you need to catch in test_getitem_numeric_column_names
Hello @yehoshuadimarsky! 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 2020-01-02 04:05:51 UTC
thanks @yehoshuadimarsky very nice
Thanks! My first pandas PR, pretty cool
REF: Refactor window/test_moments.py 
State: closed

- [x] xref #30486 
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Window
description: rolling, ewma, expanding

Comments:
Hello @charlesdong1991! 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 2019-12-30 14:06:20 UTC
all of @mroeschke suggestions are good but i’d like to first just move things then actually  break apart - otherwise the diffs are very hard to see
@jreback thanks for your comments! Could you please explain a bit more about your point, i think currently this PR is basically simply moving things (except for a couple parametrizations). Or you want them to be split to different files/directories?

Would be nice to hear more so that I could make changes based on @mroeschke nice reviews later on tonight. Thanks! 
i want things move with minimal changes in a PR
then you can come back with following PRs to actually parametize / split tests and so on
otherwise the diff is not clear in what is moving / what is actually changing

so pls make this PR solely about moving things to subdirectories (sure you will need some very minor changes to get things to pass) but don’t do anything more than that in this PR
Hi, @jreback I revert the change based on your tips, and in this PR i only split tests into three sub-files

To be clear of what i did in this PR:
There is a subfolder now under `window` called `moments`, in which there are three files, for `expanding`, `rolling` and `ewm` separately. And in each file, there are two cases, one for `TestMoments` and one for `TestMomentsConsistency`. 
In order to facilitate it, i made a base class for `MomentsConsistency` tests in `common.py`

@mroeschke many thanks for your nice reviews, following @jreback suggestion, I will address all of them in the follow-up PR and make this PR solely for tests split into sub-files.
thanks @charlesdong1991 

yeah happy to have followups to split / clean this.
TYP: Implicit generic "Any" for builtins
State: closed

xref #30539

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

Comments:
Is there a config setting to (dis)allow this per module? Or is it global?
> Is there a config setting to (dis)allow this per module? Or is it global?

disallow_any_generics picks these up, see #30539, could be global or per module. To ONLY find these would require custom script/clever regex
Gotcha. So we'll just need to watch out for these until https://github.com/pandas-dev/pandas/issues/30539 is all done?
Thanks!
Grr sorry I messed up the merge. Did a rebase and merge instead of a squash. Sorry :/
CI: Travis default version of python to 3.7
State: closed

- [x] closes #30538
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: CI
description: Continuous Integration

Comments:
thanks @MomIsBestFriend
CI: Web_and_Docs failing
State: closed

- [ ] closes #30527
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: CI
description: Continuous Integration

Comments:
> Did you manage to know if the calls to the deprecated functions are in sphinx, in our code, or somewhere else?

see https://github.com/pandas-dev/pandas/issues/30527#issuecomment-569492859
thanks @simonjayhawkins
Performance of maybe_box_datetimelike #30520
State: closed

- [x] closes #30520
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] `maybe_box_datetimelike` avoids unnecessary conversion of `value` to `tslibs.Timestamp` or `tslibs.Timedelta` if `value` is already an instance of `tslibs.Timestamp` or `tslibs.Timedelta`.


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

Comments:
Hello @ivan-vasilev! 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 2020-01-01 23:40:02 UTC
See my comment in the issue: https://github.com/pandas-dev/pandas/issues/30520#issuecomment-569521056.  Is this really the appropriate place for the performance fix?  Or should this be done in the `Timestamp` constructor?
linting issue should be fixable by running `black pandas/core/common.py`
this is subsumed by #30676 (though if you still think there is a perf benefit after that certainly ping).
CLN: remove kwargs from (DataFrame|Series).fillna
State: closed

(DataFrame|Series).fillna  have the same parameters as NDFrame.fillna, so the **kwargs is not needed. Also make the return type more specific.

Labels:
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
LGTM.

@jorisvandenbossche any idea whats going on with the docbuild?
thanks
BUG: pct_change wrong result when there are duplicated indices
State: closed

- [x] closes  #30463
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Missing-data
description: np.nan, pd.NaT, pd.NA, dropna, isnull, interpolate

Comments:
@jbrockmendel can you give the tests a quick once over.
LGTM
WARN: Ignore NumbaPerformanceWarning in test suite
State: closed

Followup to #30151; ignoring `NumbaPerformanceWarning` raised in the test suite when `parallel=True` while the function being tested cannot be parallelized. This behavior is fully intended.


Labels:
name: Window
description: rolling, ewma, expanding
name: Warnings
description: Warnings that appear or should be added to pandas

Comments:
thanks
ENH: Timedelta support high-freq units
State: closed

- [x] closes #23571
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:

Comments:
Hello @jbrockmendel! 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 2019-12-28 02:40:27 UTC
OK.  Will see if we can at least give a better error message.
TST: tests for preserving views
State: closed

- [x] xref #28150
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


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

Comments:
thanks. left the issue open as you are just xfailing it.
That issue is specific to PandasArray; there is a separate issue for IntervalArray
POC/TST: dynamic xfail
State: closed

Motivation: we have a non-trivial number of places where we do `pytest.xfail` within a test (as opposed to via decorator).  This has the downside of always being non-strict, so incorrectly-xfailed tests will never show up as xpassing.

This uses a workaround to dynamically add the pytest.mark.xfail marker within the test rather than raising pytest.xfail directly.

Thoughts?

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

Comments:
Nice! wasn't aware of this - came in handy in https://github.com/pandas-dev/pandas/pull/30544
Do we want to do this across the codebase? - I can create an issue if so
> Do we want to do this across the codebase? - I can create an issue if so

sure, should create a convenience function to do this, put in _test_decorators
thanks
ENH: add support for reading binary Excel files (#15914)
State: closed

Hi, this is a quick fix for #15914.

After reading the issue I'm not sure if this is meant to be supported though, please let me know!

I ran into this issue when trying to pass to `read_excel` a binary file downloaded with `requests` so I think it would make sense to support this natively without the user having to figure out the need to call `io.BytesIO` first. If so, do we need to update other docstrings?

Thank you!

- [x] closes #15914
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Enhancement
name: IO Excel
description: read_excel, to_excel

Comments:
Thank you @gfyoung, I have updated the `read_excel` docstring
Thanks @ftruzzi!
Thank you @gfyoung @simonjayhawkins @WillAyd for your help and thorough reviews! Happy to contribute :)
DEPR: tz-aware Series/DatetimIndex.__array__ returns an object array of Timestamps
State: closed

- [x] closes #24716
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Timezones
description: Timezone data dtype
name: Deprecate
description: Functionality to remove in pandas

Comments:
IIRC the places where i see this warning are in xarray and matplotlib tests.  should we check with them to make sure they're ready for this?  cc @shoyer @tacaswell 
closes #24716?
Yup, looks like it.
I guess waiting on xarray / mpl, can you open an issue on each of those trackers.
Does/should this affect `np.array(datetimeindex)`?
Yeah, https://github.com/pandas-dev/pandas/pull/30516/files#diff-b8a7b94d7e2ed5f7f109922e7bd3480cL313.

FWIW, I don't think we need to wait on xarray or matplotlib. These are warnings that should be seen by the user, and they have actions they can take already to avoid them.
+1 for xarray -- this is something that users can already deal with as
needed

On Thu, Jan 2, 2020 at 9:47 AM Tom Augspurger <notifications@github.com>
wrote:

> *@TomAugspurger* approved this pull request.
>
> —
> You are receiving this because you were mentioned.
> Reply to this email directly, view it on GitHub
> <https://github.com/pandas-dev/pandas/pull/30516?email_source=notifications&email_token=AAJJFVRGXQX7FVU2XOA6TNTQ3YSEFA5CNFSM4KAAXYKKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCQRAQWY#pullrequestreview-337774683>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJJFVSCRWSRBM6DSSDSSBDQ3YSEFANCNFSM4KAAXYKA>
> .
>

thanks @mroeschke
BUG: List indexer on PeriodIndex doesn't coerce strings
State: closed

- [x] closes #11278
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Description:
In single object indexer case,
datetime string converted to datetime-like object. Because indexing use ".xs" which is ".get_loc" that has type casting labels code. 

But in list indexer, 
there is no type check and casting code. So i add them.

this bug happen not only series but also dataframe And "datetimeindex" as well as "periodIndex"


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Period
description: Period data type

Comments:
Hello @proost! 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 2020-05-03 15:17:33 UTC
@jbrockmendel if you'd have a look
@jreback 
Sorry about the mess. I made mistakes while rebase on it. Again, I'm really sorry.
will look at this today
@proost there is some code in _libs.index that i _think_ is trying to do this for PeriodIndex but is evidently not being reached.  can you see if this can just be handled by PeriodEngine.get_indexer?
> @proost there is some code in _libs.index that i _think_ is trying to do this for PeriodIndex but is evidently not being reached. can you see if this can just be handled by PeriodEngine.get_indexer?

Nope. PeriodEngine can't.
@jbrockmendel over to you if any comments.
looks find. can you merge master and ping o green.
ping @jreback 
thanks @proost for sticking with this
DEPR: Remove Series.compress
State: closed

- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

As noted in https://github.com/pandas-dev/pandas/issues/6581, sounds like we are okay breaking compatibility with `np.compress`

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

Comments:
thanks @mroeschke
BUG: hash_pandas_object fails on array containing tuple #28969
State: closed

- [x] closes #28969
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

ATM this implements a smoke-test that the cases don't raise, but I don't have a canonical answer to test them against.  Could hard-code the result I get now.  Thoughts?

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

Comments:
moved the tuple-catching to hash_object_array, added check for non-hashable within a tuple
also have 2 tests in the OP

```
pd.util.hash_pandas_object(pd.DataFrame({'data': [tuple('1'), tuple('2')]})) # fails
pd.util.hash_pandas_object(pd.DataFrame({'data': [tuple([1]), tuple([2])]})) # fails
```

Also needs a whatsnew note.
> also have 2 tests in the OP

these are the df1 and df2 in the test that this adds.

> Also needs a whatsnew note.

updated.
Thanks!
BUG: pass 2D ndarray and EA-dtype to DataFrame, closes #12513
State: closed

- [x] closes #12513
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Bug
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.
name: Constructors
description: Series/DataFrame/Index/pd.array Constructors

Comments:
Can you add a whatsnew for this?
thanks, followup (pls create an issue or add to list)
BUG: DTA/TDA/PA iadd/isub should actually be inplace
State: closed

- [x] closes #24115
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


Labels:
name: Bug
name: Datetime
description: Datetime data dtype
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
did we ever deprecate the i place ops for Index?
> did we ever deprecate the i place ops for Index?

They dont produce any kind of warnings, but they dont actually operate inplace
> > did we ever deprecate the i place ops for Index?
> 
> They dont produce any kind of warnings, but they dont actually operate inplace

right and since they are immutable objects we shouldn’t
allow it anyhow. 
thanks
Mark unused parameters in objToJSON
State: closed

If compiled with `-Wextra` you get 58 warnings; this brings things down to 2 and I think helps the reader

Labels:
name: IO JSON
description: read_json, to_json, json_normalize
name: Clean

Comments:
i take it these cant just be removed because they're callbacks and need to have a standardized signature?
For the most part yes
LGTM
sure
Replace "foo!r" to "repr(foo)" syntax #29886
State: closed

xref #29886 
Fixed the remaining files in:

Replace "foo!r" to "repr(foo)" syntax #29886




Labels:
name: Code Style
description: Code style, linting, code_checks
name: Clean

Comments:
Does this close the issue mentioned in the OP?
@willayd, the OP requested that a unit test be implemented as well.  This has not been done yet
Thanks!