BrandonFors/pandas-github-issues huggingface dataset:
STY: "{foo!r}" -> "{repr(foo)}" #batch-3
State: closed

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


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

Comments:
Hello @MomIsBestFriend! 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-09 11:15:26 UTC
cc @simonjayhawkins @WillAyd 
lgtm ping on green
ping @jreback 
Thanks @MomIsBestFriend
CLN: f-string in pandas/core/window/*
State: closed

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


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

Comments:
finally ready for review
thanks @ganevgv
CLN: fix pytables passing too many kwargs
State: closed

We have a few methods that take `**kwargs` and ignore them.  It turns out the reason for this is in `_write_to_group`, where we pass `**kwargs` to two separate functions (`_create_storer` and `write`), each of which actually needs a specific subset.  By making kwargs explicit in _write_to_group, we can pass the correct ones to create_storer and write, and remove some unused kwargs from other signatures.

Labels:
name: IO HDF5
description: read_hdf, HDFStore
name: Clean

Comments:
sure
STY: "{foo!r}" -> "{repr(foo)}" #batch-2
State: closed

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


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

Comments:
thanks
STY: "{foo!r}" -> "{repr(foo)}" #batch-1
State: closed

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


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

Comments:
Anyone can help me out here?

I'm pretty lost, I have no idea why everything passed except the ```windows py3.6```.

Any ideas?
thanks @MomIsBestFriend
TYP: Annotated __eq__
State: closed

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


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

Comments:
lgtm. @simonjayhawkins @WillAyd 
Thanks @MomIsBestFriend
BUG: fix Series.interpolate(method='index') with unsorted index
State: closed

`Series.interpolate(method='index')` use [numpy.interp](https://docs.scipy.org/doc/numpy/reference/generated/numpy.interp.html) under the hood, which cannot work with unsorted X values. Here we sort the known data for `numpy.interp`.

- [x] closes #21037
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry


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

Comments:
Hi @jreback, all done, please have a look.
lgtm. @TomAugspurger  if any comments
Thanks!
A closing parenthesis has been added to resolve a typo.
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry
This pull request addresses https://github.com/pandas-dev/pandas/issues/29934

Labels:
name: Docs

Comments:
Great thanks @tab1tha !
Thanks for merging my first PR @WillAyd !
ENH: support datetime64, datetime64tz in nanops.mean, nanops.median
State: closed

Tracking down relevant issues and figuring out test coverage is the "WIP" part of this.

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

Comments:
this looks good. can you add a deprecation note in whatsnew and rebase.
whatsnew added, rebased+green
lgtm. once more rebase and merge on green. (also add to the deprecated issue tracker as well).
Thanks @jbrockmendel
BUG: merge_asof with tz_aware left index and right column
State: closed

- [x] closes #29864
- [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: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Timezones
description: Timezone data dtype

Comments:
Tested the reverse case and green.
thanks @mroeschke
STY: F-strings and repr
State: closed

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


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

Comments:
Hello @MomIsBestFriend! 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-11-30 21:34:46 UTC
thanks @MomIsBestFriend 

if you would add a code-check for using ``r!`` would be great!
> thanks @MomIsBestFriend
> 
> if you would add a code-check for using `r!` would be great!

Sure I'll just eliminate every occurrence of ```!r``` first
thanks @MomIsBestFriend  :)
CI: added unwanted pattern test case for "foo.__class__" instead of type(foo)
State: closed

- [ ] closes #xxxx
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

ref #29816 (splitted to #29889, #29893, #29894, #29902, #29904, #29905)

Labels:
name: CI
description: Continuous Integration
name: Code Style
description: Code style, linting, code_checks

Comments:
Looks good. To be sure can you intentionally change the code somewhere to make this fail so we can see how it looks in CI?
ping @WillAyd 
![image](https://user-images.githubusercontent.com/16733618/69904819-6008ae00-13a3-11ea-9e33-29411d0d4a93.png)

This is how it looks in CI. Might be worth adding something that explains one should use type()?
Great thanks @MomIsBestFriend
TST: add test for rolling max/min/mean with DatetimeIndex over different frequencies
State: closed

Follow-up work on #29761 - parametrize over different operations and frequencies

- [x] xref #21096
- [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 @ganevgv !
DEPR: DataFrame.sort_index by keyword
State: closed

This one was deprecated back in 0.17.0, so long time coming.

There's some more cleanup that can be done around this method in a follow-up.

Labels:
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode
name: Deprecate
description: Functionality to remove in pandas

Comments:
thanks @jbrockmendel
DEPR: DTI/TDI/PI constructor arguments
State: closed


Labels:
name: Datetime
description: Datetime data dtype
name: Timedelta
description: Timedelta data type
name: Period
description: Period data type
name: Deprecate
description: Functionality to remove in pandas
name: Index
description: Related to the Index class or subclasses
name: Constructors
description: Series/DataFrame/Index/pd.array Constructors

Comments:
The updated edit in the 0.15.0.rst is a shot in the dark, suggestions welcome on the appropriate way to handle it
lgtm, can you add a deprecation removal note in whatsnew, ping on green.
ping
DEPR: tz_convert in the Timestamp constructor raises
State: closed

- [x] xref #23621
- [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:
one test request, otherwise LGTM
LGTM pending green
All green.
thanks @mroeschke
BUG: Index.get_value implementation for ExtensionArray
State: closed

Closes https://github.com/pandas-dev/pandas/issues/29708

cc @jreback @jbrockmendel 

Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: ExtensionArray
description: Extending pandas with custom dtypes or arrays.

Comments:
The linked issue mentions densifying, which I think mostly affects SparseArray and Categorical.  Would it make sense to test on those?  Or is DecimalArray affected too?
> The linked issue mentions densifying, which I think mostly affects SparseArray and Categorical. Would it make sense to test on those? Or is DecimalArray affected too?
> ..
> can you make this test more generic (e.g. hit more EA arrays)?

For DecimalArray, converting to object array is indeed not a problem (it stores a numpy object array anyway), while for Categorical/Sparse this is more expensive. But it's the mechanism I want to test, and for that it doesn't matter much that it's not expensive for DecimalArray.

Making the test more generic (a base test so it is automatically run for all EAs) would be possible, but I am not sure it would be worth it: I would need to add several exceptions (overriding it in several places for certain dtypes to skip it: for sparse it still densifies (which is a separate issue), for numpy ones the test is not valid (it needs to convert to array), for interval it fails for another reason, for boolean is currently still converts to numpy array for the comparison operation, ...). And in the end, I mainly want to test the mechanism in the Index.get_value, which is not dependent on implementation details of the specific EA.
thanks
CLN: move odf import inline in excel benchmark
State: closed

I know this is an optional dependency, but IMO it's still nice that running a different benchmark still works when you don't have odf installed (noticed this yesterday when running the isnull benchmarks). It's similar to pytest skipping if an optional dependency is not installed.

Labels:
name: Clean
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
Does the asv.conf not account for this when building the environment?
actually odpy is IN the asv.conf.json.
Sorry for the slow reply: you are right the env creation handles this fine, but if you use `asv dev` or `asv run ` with some config, you can use your existing environment. So therefore I just ran into this (my dev environment was created before odpy was added as optional dependency). So no big deal, I just find it a bit friendlier to not directly error when you are trying to run other, unrelated benchmarks.
we don’t do this for any other optional deps
this makes for a confusing style

i would say simply update the asv environment

> i would say simply update the asv environment

It's *not* the asv environment

> we don’t do this for any other optional deps

We do this constantly in eg tests (you can run tests without having all optional dependencies installed)
Yea I agree with Jeff - I think confusing to special case just this one library
>  I think confusing to special case just this one library

I am happy to do it for *all* libraries, which are those odfpy imports and a single sqlalchemy import
I still would rather not change this; we only document using `asv continuous` in the contributing guide as of now
1) Avoiding special casing is good (@jreback and @WillAyd's points)
2) The frictions in using asv in development are a PITA, things that mitigate that are good (@jorisvandenbossche's point)

I'm inclined to think the special casing here is pretty benign and 2 is more important.
I would rather have asv hard fail than special case. special cases have a trend of making code harder to grok and splintering style. so closing this, but would take a PR to make *alls* optional deps not make it hard fail, or we do nothing.
CLN: OrderedDict -> Dict
State: closed

- xref https://github.com/pandas-dev/pandas/issues/30469
- [x] follow up from https://github.com/pandas-dev/pandas/pull/29212
- [x] passes `black pandas`

As of CPython 3.6 the implementation of dict maintains insertion order.

This became a language feature in python 3.7.

Note in python 3.8 support for reversed(dict) was added - but we don't seem to use that in the use cases i've eliminated.

There is more to do here.

Labels:
name: Clean

Comments:
Can you use dict literals where possible, i.e. ``{"": (0, 0)} `` ``dict((("", (0, 0)),))`` etc.

Else LGTM.
@alimcmaster1 yeah lgtm. but agree we need a code check here, can you add.
Thanks @topper-123 updated as per your comments. @jreback sure will add a code check in a follow up - there are still some more references to remove but ill save those for next PR
Thanks @alimcmaster1
BUG: loc-indexing with a CategoricalIndex with non-string categories
State: closed

- [x] closes #17569
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [x] whatsnew entry

Bug when indexing with ``.loc`` and the index is a CategoricalIndex with integer or float categories.

Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Categorical
description: Categorical Data Type

Comments:
Hello @topper-123! 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-11 07:13:21 UTC
Ill be abroad untill the weekend, will look at it then. I think it would cause a error with categories made from datetimeindex, but I’ll check.
I`ve updated the PR: I´ve removed _defer_to_indexing and added some tests.
I've updated and use the dtypes from pandas/conftest.py instead.
thanks @topper-123 very nice!
Document S3 and GCS path functionality of DataFrame.to_csv()
State: closed

- [x] closes #8508 

I made more changes than absolutely necessary for documenting this. It's a bit more complete and it reads a more similar to `pd.read_csv()`

Labels:
name: Docs

Comments:
I agree this is actually implied. I also think that’s not helpful enough for a decent portion of pandas users who may find this useful.

I considered adding it to the user guide. But my impression is that the guidance there usually is a bit more complete.

I could always write it as an answer to a StackOverflow question and hope search indexes will help me.

Sent from ProtonMail Mobile

On Fri, Nov 29, 2019 at 18:24, William Ayd <notifications@github.com> wrote:

> @WillAyd commented on this pull request.
>
> Thanks for the PR. Question on my end
>
> ---------------------------------------------------------------
>
> In [pandas/core/generic.py](https://github.com/pandas-dev/pandas/pull/29920#discussion_r352211962):
>
>> @@ -3128,10 +3128,12 @@ def to_csv(
>
>          Parameters
>          ----------
> -        path_or_buf : str or file handle, default None
> -            File path or object, if None is provided the result is returned as
> -            a string.  If a file object is passed it should be opened with
> -            `newline=''`, disabling universal newlines.
> +        path_or_buf : str, path object, file-like object, default None
> +            If a string is passed, it can be an existing local file path, as
> +            well as a gcs:// or s3:// path. If a file object is passed it
>
> So I might be a little too strict, but I'm generally against documenting requirements of third party dependencies - would these not generally fall under the umbrella of being "file-like" to begin with?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, [view it on GitHub](https://github.com/pandas-dev/pandas/pull/29920?email_source=notifications&email_token=AB3PSJPXTOLLDDHBLSOS47DQWFF6HA5CNFSM4JSYJQ3KYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOCNOEL4Y#pullrequestreview-324814323), or [unsubscribe](https://github.com/notifications/unsubscribe-auth/AB3PSJMBMGJ2SIJWNAVB6EDQWFF6HANCNFSM4JSYJQ3A).
Yea let’s do that. So I think you can revert the changes to pandas/core/generic, but can keep the typo fix in the IO guide and we can merge
Great thanks @oguzhanogreden
DEPR: remove itemsize, data, base, flags, strides
State: closed

and un-deprecated `item`, though im not sure where that goes in the whatsnew

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

Comments:
You will need to remove some things from the API docs (that's what the doc failure is complaining about)
Will update per comments.  Also need to change the implementation so item() raises for len!=1
Can you leave the `item` change for a separate PR? 
That change deserves specific attention I think, not hidden in an "easy remove some stuff" PR
> Can you leave the item change for a separate PR?

Sounds good
updated+green, un-doing `item` changes
lgtm, need a rebase
rebased+green
Thanks @jbrockmendel
CI: Highlighting flake8 and grep errors in GitHub Actions
State: closed

Our code checks genereated the output in a way that Azure pipelines was highlighting the errors. In GitHub actions it's possible to do more or less the same, but with a different syntax. Changing the syntax here, and simplifying some tricky parts in the script.

Introducing some errors, so we can see how it looks.

Labels:
name: CI
description: Continuous Integration
name: Clean

Comments:
Hello @datapythonista! 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:

* In the file [`pandas/__init__.py`](https://github.com/pandas-dev/pandas/blob/22a0743e2221b8c1af6832a688078b88b57b9fa8/pandas/__init__.py):

> [Line 20:56](https://github.com/pandas-dev/pandas/blob/22a0743e2221b8c1af6832a688078b88b57b9fa8/pandas/__init__.py#L20): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace
> [Line 24:27](https://github.com/pandas-dev/pandas/blob/22a0743e2221b8c1af6832a688078b88b57b9fa8/pandas/__init__.py#L24): [W291](https://duckduckgo.com/?q=pep8%20W291) trailing whitespace



##### Comment last updated at 2019-11-28 14:31:10 UTC
neat
This might a different issue but I think all steps should run and not just exit when a step fails.

Its annoying to fix one issue only to be confronted by another on the next run. What do you think?

![image](https://user-images.githubusercontent.com/16733618/69833252-80612d00-122a-11ea-80ed-2de2f92f84d4.png)

> This might a different issue but I think all steps should run and not just exit when a step fails.

I think this is a problem with GitHub. This was working as expected, and the configuration didn't change. If they don't fix it in couple of days I'll report it, and see what they say.
thanks
DEPR: Remove errors argument in tz_localize
State: closed

- [x] xref #22644
- [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:
LGTM pending green
Thanks @mroeschke 
pls update #6581 if appropriate
BUG/DEPR: Timestamp/Timedelta resolution
State: closed

Timedelta.resolution used to return a string, but that was deprecated in 0.25.0.  Enforce that deprecation to return Timedelta(nanoseconds=1), mirroring the stdlib timedelta.resolution behavior.

Timestamp.resolution correctly mirrors datetime.resolution by returning Timedelta(nanoseconds=1), but it is a property whereas for the stdlib it is a class attribute.  This PR makes it a class attribute for Timestamp.

Labels:
name: Timedelta
description: Timedelta data type
name: Deprecate
description: Functionality to remove in pandas

Comments:
updated+green
Thanks @jbrockmendel
Added FutureWarning to Series.str.__iter__
State: closed

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


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

Comments:
@jreback The deprecation follows from the discussion in #28319 where an actual fix to the issue was suggested:

WillAyd:
> I think the best approach would be to deprecate the __iter__ method of Series.str as noted above and remove in the future
> @jreback The deprecation follows from the discussion in #28319 where an actual fix to the issue was suggested:
> 
> WillAyd:
> 
> > I think the best approach would be to deprecate the **iter** method of Series.str as noted above and remove in the future

ok i see the conversation and agree deprecation is ok. but this doesnt' fix the actual bug #28277 
 right? (meaning that should be a separate PR).
Yes, the bug isn't fixed by that, but @TomAugspurger suggested (in the issue) the expected behaviour should be to raise an exception:
> series.str is an accessor, not an array-like of strings. I would expect an exception to be raised here.

So even though the bug isn't fixed immediately, in later versions, when this deprecation is taking effet, it will be resolved. Do you mean we should keep the issue open until then @jreback?
Resolved merge conflict and removed the "closes" tag from the PR description @jreback 
@SaturnFromTitan can you merge master
CI is green @jreback 
great will look soon
thanks @SaturnFromTitan
TYP: Annotated pandas/core/indexing.py
State: closed

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


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Typing
description: type annotations, mypy/pyright type checking

Comments:
> lgtm. I think additional types as proposed by @jbrockmendel would be nice if not too much extra effort

The problem is that I don't know how to annotate them:(
OK thanks @MomIsBestFriend . Sure can always add more types as you get more familiar with code base
CI: Making benchmark errors easier to find
State: closed

- [X] xref https://github.com/pandas-dev/pandas/pull/29900#issuecomment-559278405

It takes a while to find the failing line of the benchmarks logs at the moment. This should highlight the failing ones, and also publish the log as an artifact so it can be analyzed easier.

CC: @jbrockmendel 

Labels:
name: CI
description: Continuous Integration
name: Benchmark
description: Performance (ASV) benchmarks

Comments:
Looks like the desired error messages did show up, not sure if there are some non-desired ones in there too
Cleaned it a bit, errors were being duplicated, not sure why.

The log when not failures were found was not being shown. Not sure why I did that, but I think it makes sense that it's shown, so restored it.
Sounds good.  Some unwanted errors might go away after #29906.
@jbrockmendel this looks good to me now. If you can have a look, I'll remove the failure once you're happy.

Error can be seen here: https://github.com/pandas-dev/pandas/pull/29907/checks?check_run_id=324562585#step:13:3037
nice!
ok lets try it out
STY: x.__class__ to type(x) #batch-6
State: closed

- [x] ref https://github.com/pandas-dev/pandas/pull/29816
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

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

Comments:
Thanks @MomIsBestFriend - is that all of the remaining ones? If so can you add a code check in a follow up PR?