BrandonFors/pandas-github-issues huggingface dataset:
TST: implement test to_string_empty_col for Series (GH13653)
State: closed

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


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Strings
description: String extension data type and string data

Comments:
Hello @NomadicDaggy! 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-09-29 16:46:39 UTC
Does this warrant a whatsnew entry?
thanks @NomadicDaggy
REF: rearrange test_to_latex.py
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Rearranged tests in ``test_to_latex.py`` to the corresponding classes.
Sorry for the messy diffs.
All I did (except to small commits cd92db9 and 2b66e2f) was rearrangement of the tests.

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

Comments:
can you just confirm that before & after test counts are the same for latex.
"Added" tests:
```
$ git diff e260f58^..8815c7f | grep "^+.*def test_" | wc -l
44
```

"Deleted" tests:
```
$ git diff e260f58^..8815c7f | grep "^-.*def test_" | wc -l
43
```

One extra test was added: ``test_to_latex_column_format_just_works`` as a result of splitting ``test_to_latex_column_format``.
Originally ``test_to_latex_column_format`` basically comprised two tests: one to check that column format just works without failing for dataframe ``float_frame`` (fixture) and the second one to test result vs expected for small dataframe. I extracted the test ``_just_work`` for the ``float_frame``.

thanks @ivanovmg
CLN: pandas/core/indexing.py
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Slight clean-up of ``pandas/core/indexing.py``.

- Use ``suppress`` instead of ``try/except/pass`` (starting from Python 3.7)
- Slight rearrangement of statements
- Extract method ``_validate_key_length``

Labels:
name: Refactor
description: Internal refactoring of code
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves

Comments:
LGTM pending green.

If you're looking for high-value things to do in this file, narrowing what we're catching/suppressing is a never-ending battle.
Lgtm 
Can anyone re-start CI? Looks like there were internal CI engine failures.
thanks @ivanovmg nice cleanup
Fix delim_whitespace behavior in read_table, read_csv
State: closed

- [x] closes #36583
- [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: API Design
name: IO CSV
description: read_csv, to_csv

Comments:
Hello @OlehKSS! 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-10-07 21:31:37 UTC
cc @gfyoung if you can have a look.
The changes look pretty reasonable, @jreback's comment notwithstanding.

Test failures look unrelated AFAICT.
I updated the pull request:

- added a note to whatsnew
- moved duplicated validation to a separate function
@jreback @gfyoung @phofl 
I implemented the requested changes in the latest commits. Could you take one more look?
lgtm, ping on green.

cc @gfyoung if any comments.
The changes look good, but not sure why CI isn't all green...
One CI test is failing because it exceeds a timeout of 60min (Windows_py38_np18) while running tests. It seems like there are no tests that actually crash, but one test results in [Windows Access Violation](https://dev.azure.com/pandas-dev/e01c9671-576d-40f3-a1a1-7bef78604087/_apis/build/builds/44454/logs/120) in one of the threads, which seems raised by a dependency
thanks @OlehKSS very nice.
CI, CLN remove unnecessary noqa statements, add CI check
State: closed

- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

This changes loads of files, but most changes are quite trivial

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

Comments:
LGTM
> This changes loads of files, but most changes are quite trivial

Many trivial improvements is a non-trivial improvement 😄 
can you rebase just to make sure
Are we only down to F401 and F403? If so can we just fix the import machinery and get rid of noqa statements altogether? I think would be preferable to adding another tool to code checks
Sure, have merged and pushed

@WillAyd in #36684 Jeff wrote

> ideally if we have a script to see these (maybe a grep is enough), and even better to have a code-check, but not sure how heavy handed that is.

Currently it only takes about 4-5 minutes to run all the checks we're doing in pre-commit on the entire codebase, and this one accounts for about 20 seconds.

FWIW, my suggestion would be to keep this in until the import machinery is fixed, and _then_ to remove it once there are no `noqa`s anymore
> Are we only down to F401 and F403? If so can we just fix the import machinery and get rid of noqa statements altogether? I think would be preferable to adding another tool to code checks

i don't think a big deal on time; these are on the azure builds and are still faster than travis so nbd.
thanks @MarcoGorelli
CI: npdev new exception message
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] 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:
@pandas-dev/pandas-core this fixes the npdev CI failure; im planning to merge in a couple hours if there are no objections
great thanks 
@meeseeksdev backport 1.1.x
Github action for release
State: closed

for initial feedback. maybe way off base with this.

can be seen in action at https://github.com/simonjayhawkins/pandas/actions

the alternative of retaining a separate repo for release can be seen at https://github.com/simonjayhawkins/pandas-release/actions

Labels:
name: CI
description: Continuous Integration
name: Release
name: Needs Discussion
description: Requires discussion from core team before further action

Comments:
closing. wanted to avoid sharing credentials between repos just for tagging but going to continue using pandas-release for a bit.
I've re-opened so we have somewhere to discuss implementation details.

This is based off a workflow that I am using to test release readiness for the backport branch that I run manually.

I think, since the backport branch doesn't have too many commits, could change this from a manual trigger to run on push to 1.1.x
@simonjayhawkins move to pandas-release repo?
> @simonjayhawkins move to pandas-release repo?

probably need more discussion in #21050 before we can make progress here. closing to clear queue.
CLN: Format doc code blocks
State: closed

Trying to make code blocks in documentation black compliant. Also a small update to the flake8-rst config making max-line-length equal to 88.

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

Comments:
> Thanks @dsaxton is there a tool to do/check this?

I was using this one which seems quite good https://github.com/asottile/blacken-docs
> > Thanks @dsaxton is there a tool to do/check this?
> 
> I was using this one which seems quite good https://github.com/asottile/blacken-docs

cool. is there lots to do? is this good first issue material?
> cool. is there lots to do? is this good first issue material?

I think this covers all or most of it (but of course doesn't handle updates to the docs)
Thanks @dsaxton
CLN: Remove unused fixtures
State: closed


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

Comments:
LGTM
Does pytest expose a way to figure out what is / isn't being used?
> Does pytest expose a way to figure out what is / isn't being used?

There's a plugin (which is what I was using here) but not sure how well-maintained it is: https://github.com/jllorencetti/pytest-deadfixtures
thanks!

also as a possible issue / followup. we ideally want to surface the same / similar fixtures to the top level (and similarly push down ones that are ownly used beneath a particular sub-tree to a lower level). not sure if there is an easy way to do this.
DEPR: is_all_dates
State: closed

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


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

Comments:
thanks! very nice
TYP: mostly datetimelike
State: closed

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


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

Comments:
looks good, is this compat with what we merged in : https://github.com/pandas-dev/pandas/pull/36742

maybe rebase just to be sure (and merge on green).
Thanks @jbrockmendel
ENH: DatetimeArray/PeriodArray median
State: closed

- [x] closes #33760
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

nanops.nanmedian needs to be re-worked, and there's a lot more we can do to share reduction tests.  saving for separate branches.

Labels:
name: Datetime
description: Datetime data dtype
name: Numeric Operations
description: Arithmetic, Comparison, and Logical operations
name: Period
description: Period data type

Comments:
green-except-for-arm
hmm conflict again, if you can rebase
CLN: OrderedDict->dict
State: closed

- [x] closes #30469 
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

Grepping for OrderedDict in *.py files I see 84 more usages, but AFAICT these are all explicitly checking for the class, so I'm considering this as closing #30469.

Labels:
name: Clean

Comments:
azure looks stalled, says the still-running check started 22 hours ago
/azp run
<samp>
Azure Pipelines successfully started running 1 pipeline(s).<br>

</samp>
BUG: DatetimeIndex.shift(1) with empty index
State: closed

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


Labels:
name: Datetime
description: Datetime data dtype
name: Index
description: Related to the Index class or subclasses

Comments:
thanks
DOC: Start v1.1.4 release notes
State: closed

I think this requires the v1.1.3 tag in order to pass

Labels:
name: Docs

Comments:
lgtm once v1.1.3 released. 
This can already be merged in master I think? (only the backport should only be merged after 1.1.3)
don't merge. if merged web and docs will fail until tag available.
Thanks @dsaxton
TST: Add pytest-instafail to environment.yml
State: closed

Pretty useful pytest plugin for getting immediate feedback on test failures instead of waiting for an entire test suite to run:

```
(pandas-dev) ➜  pandas git:(add-pytest-instafail) ✗ pytest pandas/tests/groupby --instafail
============================================================================================ test session starts ============================================================================================
platform darwin -- Python 3.8.5, pytest-6.0.2, py-1.9.0, pluggy-0.13.1
rootdir: /Users/danielsaxton/pandas, configfile: setup.cfg
plugins: hypothesis-5.28.0, forked-1.2.0, asyncio-0.12.0, xdist-2.1.0, cov-2.10.1, instafail-0.4.1
collected 4533 items                                                                                                                                                                                        

pandas/tests/groupby/test_allowlist.py .............................................................................................................................................................. [  3%]
...........................................................                                                                                                                                           [  4%]
pandas/tests/groupby/test_apply.py ............x.x.x...................................................x..........................F

________________________________________________________________________________________________ test_fails _________________________________________________________________________________________________

    def test_fails():
>       assert False
E       assert False

pandas/tests/groupby/test_apply.py:1101: AssertionError

pandas/tests/groupby/test_apply_mutate.py ...                                                                                                                                                         [  6%]
pandas/tests/groupby/test_bin_groupby.py ..........                                                                                                                                                   [  7%]
pandas/tests/groupby/test_categorical.py .....................................................................................xxx..............................sss................................x.. [ 10%]
...
```

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

Comments:
is this not exactly what
```
  -x, --exitfirst       exit instantly on first error or failed test.
```
does? part of pytest itself
and we do not want to do this in CI builds.
This continues running the test suite on test failure, only shows the output of failures. In general I think that's a bit more useful than exiting the whole run.
ahh so it shows it as it goes, but still runs the entire thing, ok, that's useful.
LGTM pending green
thanks @dsaxton
DEPR: Deprecate params levels & codes in MultiIndex.copy
State: closed

Deprecates params `levels` & `codes` in `MultiIndex.copy`.


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

Comments:
looks fine.  is there an issue discussing this?
No issue, so I’m fine discussing it here. My opinion is that copy does too much and removing this makes the API cleaner.
thanks @topper-123
CLN remove unnecessary noqas from pandas/core
State: closed

- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

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

Comments:
LGTM, nice cleanup
thanks @MarcoGorelli 

ideally if we have a script to see these (maybe a grep is enough), and even better to have a code-check, but not sure how heavy handed that is.
> LGTM, nice cleanup

Credit to yet another asottile tool https://github.com/asottile/yesqa
bump pytables to 3.5.1 #24839
State: closed

- [x] closes #24839
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

PyTables 3.5.1 was released on March 14, 2019. And it offers better support for np16.


Labels:
name: IO HDF5
description: read_hdf, HDFStore
name: Dependencies
description: Required and optional dependencies

Comments:
can you add a whatsnew bug fix note (I/O) that the issue is fixed in the OP; can merge after that.
thanks @fangchenli
TST: insert 'match' to bare pytest raises in pandas/tests/tseries/off…
State: closed

…sets/test_ticks.py

- [ ] closes #xxxx
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

ref: https://github.com/pandas-dev/pandas/issues/30999

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

Comments:
Please have look at this PR. I am new to this, I have tried to follow guidelines as much as possible.

FYI @MomIsBestFriend
CLN: test_moments_rolling.py for mean/std/var/count/median/min/max
State: closed

- [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
name: Clean
name: Window
description: rolling, ewma, expanding

Comments:
Hello @mroeschke! 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-09-27 19:28:46 UTC
this is just moving tests around AFAICT right?
@jreback exactly. No test addition or subtraction. Just makes it easier to figure out what fails (when I am debugging locally)
kk merge on green (i think there is an unrelated fail on 38_numpy_dev but ignore for now)
CLN/TYP: aggregation methods in core.base
State: closed

- [ ] closes #xxxx
- [ ] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

This is in order to move _aggregate and _aggregate_multiple_funcs into core.aggregation - I think that's desirable. Type-hinting is slightly more strong there (checks untyped defs), and would involve renaming `self` to `obj`. Thus the renaming of `obj` to `selected_obj` here.

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

Comments:
1 mypy complaint
Thanks @jbrockmendel. The offending line is:

    name = self.name if (self.ndim == 1) else None

A natural replacement would be to do:

```
if isinstance(self, ABCSeries):
    name = self.name
else:
    name = None
```

but in general I think we prefer checking `ndim == 1` rather than `isinstance` for performance when the object is known to be a Series/DataFrame. So the other options I see here are to use cast (is `self = cast(self, ...)` okay?) or just silence mypy with # type: ignore (along with the specific code).

Any advice here @simonjayhawkins, @jbrockmendel, @jreback?
i tend to use the ndim check, but no strong opinion
I fixed by using cast; ready for review now.
@simonjayhawkins 
@simonjayhawkins Thanks for you're input. I've changed the code back to use `if ndim == 1` along with `cast`. I think this is what you meant by "may as well [cast] now" - let me know if I misunderstood.
thanks @rhshadrach
CLN: moments/test_moments_rolling.py for apply
State: closed

- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`

Overall easier to grok these tests.

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

Comments:
great thanks
REGR: Series.loc with a MultiIndex containing Timestamp raises InvalidIndexError
State: closed

ci testing fix in https://github.com/pandas-dev/pandas/issues/35858#issuecomment-678683559

- [ ] closes #35858
- [ ] tests added / passed
- [ ] passes `black pandas`
- [ ] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Datetime
description: Datetime data dtype
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Regression
description: Functionality that used to work in a prior pandas version
name: MultiIndex

Comments:
can you add the test from the OP as well
yep. the fix looks good. will add release note and tests shortly.
I can't block by requesting changes on my own PR, moving to 1.1.4 so release note needs to be moved. closing for now instead. Will re-open after 1.1.3 release.

I've started the final release readiness checks. merging now would require going back to square one.
@jreback  re-opened just in case this is almost ready
lgtm.
[MRG] TST: Added test for groupby apply datetimeindex fix
State: closed

- [x] closes #26182
- [x] tests added / passed
- [x] passes `black pandas`
- [x] passes `git diff upstream/master -u -- "*.py" | flake8 --diff`
- [ ] whatsnew entry

worked on by @ezebunandu and @amy12xx


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: Datetime
description: Datetime data dtype
name: Groupby
name: Apply
description: Apply, Aggregate, Transform, Map

Comments:
@arw2019 made the change. Let me know if you have any other comments. Thanks.
Thanks @amy12xx
DOC: Fix release note typo
State: closed


Labels:
name: Docs

Comments:
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.1.x
$ git pull
```

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

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

```
$ git commit -am 'Backport PR #36670: DOC: Fix release note typo'
```

4. Push to a named branch :

```
git push YOURFORK 1.1.x:auto-backport-of-pr-36670-on-1.1.x
```

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

> "Backport PR #36670 on branch 1.1.x"

And apply the correct labels and milestones.

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

If these instruction are inaccurate, feel free to [suggest an improvement](https://github.com/MeeseeksBox/MeeseeksDev).
                
probably need to wait till #36669 merged to do backport.
> probably need to wait till #36669 merged to do backport.

Ok, should I go ahead and open the backport PR? I have it ready.
yep. likely have conflicts if created b4 merge.
it's typically that normally need to trigger the backport and when you don't want it, it works.