BrandonFors/pandas-github-issues huggingface dataset:
TST: Add tests for single group
State: closed

- [x] closes #13530
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`


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

Comments:
lgtm

ideally would add this issue number to the xref issue which actually closed this

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13561?src=pr) is **84.34%**

> Merging [#13561](https://codecov.io/gh/pydata/pandas/pull/13561?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13561   diff @@
==========================================
  Files           138        138          
  Lines         51126      51126          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43122      43122          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [f20b41e...9937e99](https://codecov.io/gh/pydata/pandas/compare/f20b41e73fdc84089289cd3999762892f85ec4b6...9937e9933e2b73e5523355ceee975eeffbe3f575)
Update gotchas.rst
State: closed

Removed redundant words


Labels:
name: Docs

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13560?src=pr) is **84.34%**

> Merging [#13560](https://codecov.io/gh/pydata/pandas/pull/13560?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13560   diff @@
==========================================
  Files           138        138          
  Lines         51126      51126          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43122      43122          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [f20b41e...4fa6c93](https://codecov.io/gh/pydata/pandas/compare/f20b41e73fdc84089289cd3999762892f85ec4b6...4fa6c93eb2079a01cb612ef1a993ef9e16e106d5)

thanks!
TST: confirm bug in partial string multi-index slicing is fixed (GH12685)
State: closed

Closes #12685


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

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13559?src=pr) is **84.34%**

> Merging [#13559](https://codecov.io/gh/pydata/pandas/pull/13559?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13559   diff @@
==========================================
  Files           138        138          
  Lines         51126      51126          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43122      43122          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [f20b41e...3566573](https://codecov.io/gh/pydata/pandas/compare/f20b41e73fdc84089289cd3999762892f85ec4b6...3566573625bda22ad9f5e7ffd1619c70d72263ea)
BUG: pivot_table always returns a DataFrame
State: closed

- [x] closes #4386
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

Before this commit, if
- `values` is not list like
- `columns` is `None`
- `aggfunc` is not instance of `list`

`pivot_table` returns a `Series`.

This commit adds checking for `columns.nlevels` is
greater than 1 to prevent from casting `table` to
a `Series`.

This will fix #4386.


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

Comments:
can you rebase / update?

can you rebase and add a release note for 0.20.0

Sorry to my late response, I rebased and add note for 0.20.0.

can you rebase
Rebased !
@yui-knk looks like some test failures: https://travis-ci.org/pandas-dev/pandas/jobs/186874138#L1939

Can you test those out locally and see if you reproduce?
can you rebase. I think you have a failing test as well.
can you rebase/update
I think you need to change this test to return DataFrame rather than Series. otherwise looks ok: https://travis-ci.org/pandas-dev/pandas/jobs/208224356
also, I'd like to have a sub-section in the whatsnew which shows the case where this *used* to return a Series, but now returns a DataFrame (you can use one of your tests examples).
thanks @yui-knk rebase and merged.
TST: Move `test_crosstab_margins` to `TestPivotTable`
State: closed

This test case assert `pivot_table` method.
So it should be defined on `TestPivotTable`.


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

Comments:
@yui-knk Seems reasonable indeed.

There is one failing test, but you don't need to bother about that (it's data-reader related, they fail once in a while), but there is also a lint error. You just need to add an extra blank line after the test function (pep8). Can you update for that?

lgtm (assume pep is fixed)

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13553?src=pr) is **84.34%**

> Merging [#13553](https://codecov.io/gh/pydata/pandas/pull/13553?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13553   diff @@
==========================================
  Files           138        138          
  Lines         51126      51126          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43122      43122          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [7c9ba14...e996e6a](https://codecov.io/gh/pydata/pandas/compare/7c9ba14c6ddd91916ffd7fc5548731265533e88d...e996e6a8c883f54d1817a62ca620e358675103f9)
Fix missing not in format._put_lines
State: closed


Labels:
name: Output-Formatting
description: __repr__ of pandas objects, to_string

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13552?src=pr) is 84.31% (diff: 100%)

> Merging [#13552](https://codecov.io/gh/pydata/pandas/pull/13552?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will decrease coverage by **0.97%**

``` diff
@@             master     #13552   diff @@
==========================================
  Files           139        138     -1   
  Lines         50241      51157   +916   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42851      43131   +280   
- Misses         7390       8026   +636   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [5d791cc...d599b10](https://codecov.io/gh/pydata/pandas/compare/5d791cc7d955c0b074ad602eb03fa32bd3e17503...d599b10667fd83a5e865059123da56bc715da306?src=pr)

@jreback the following raises a TypeError

``` python
import pandas as pd
from io import StringIO
buf = StringIO()
pd.DataFrame().info(buf=buf)

   2642     if any(isinstance(x, compat.text_type) for x in lines):
   2643         lines = [compat.text_type(x) for x in lines]
-> 2644     buf.write('\n'.join(lines))
   2645 
   2646 

TypeError: unicode argument expected, got 'str'
```

 Which I believe this PR fixes (and is the proper intention of the code)

@limx0 Can you add a test for the actual `info` issue?

@jorisvandenbossche this is now working in the latest master. Closing this PR
Removed unnecessary params in cum_func
State: closed

Picks up from #13167 by properly removing the parameters and ensuring that `numpy` compatibility has been maintained.  The current test suite does a good job of checking that already, so no tests were added.

Closes #13541.


Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13550?src=pr) is **84.34%**

> Merging [#13550](https://codecov.io/gh/pydata/pandas/pull/13550?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13550   diff @@
==========================================
  Files           138        138          
  Lines         51113      51119     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43109      43115     +6   
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [a01644c...6ba7a77](https://codecov.io/gh/pydata/pandas/compare/a01644c07f376b4e2eb48d8dfca7222473e3088d...6ba7a77b868869a31b26538a9c6dd0d81d71fd8e)

Looks good to me!

do need a test for this?
as prior treats didn't catch this

Catch what?  We already have tests in fact to ensure that the `numpy` call won't break as well as one for non-default arguments in `test_generic.py`.

what I mean is I suspect we have more functions that have named numpy args - they work but we are specifically naming them 

AFAIU `cum_func` is a template for **all** of the accumulation functions for `DataFrame` and `Series` at the very least.  What other functions are you referring to?

no my point is that there might be others that accept the dtype argument (or out) and yet are validated, but we really should remove the actual named arguments. This one was not caught, so there might be others. You might have to inspect them manually. Not sure you can tell the difference between a named arg and a kwarg once your function sees it.

@jreback : GitHub search indicates that `out=None` is essentially nonexistent in the code-base except for `cum_func`, `algorithms.py` and `function.py` (my `numpy` compat module).

However, the same cannot be said with `dtype=None`.  Manual inspection of every `dtype=None`?  That's just being ridiculous.

Fortunately, a GitHub search indicates that all other instances of `dtype=None` are called from functions that I know definitely do not exist in `numpy`, so I think we are good to go on that.

ok, then lgtm. yeah the `out` in algorithms.py is ok.
DOC: Update old Google Code and SourceForge links
State: closed


Labels:
name: Docs

Comments:
@proinsias  Thanks a lot!

Only a small PEP8 issue

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13534?src=pr) is **84.34%**

> Merging [#13534](https://codecov.io/gh/pydata/pandas/pull/13534?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13534   diff @@
==========================================
  Files           138        138          
  Lines         51126      51126          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43122      43122          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [f20b41e...85b4042](https://codecov.io/gh/pydata/pandas/compare/f20b41e73fdc84089289cd3999762892f85ec4b6...85b404269c90f0fdda352e00ee50a309aab9003d)

Updated all statsmodels links, and double-checked pep8! 

Thanks a lot!
Update documentation for rename
State: closed

- [x] closes #13473
- [ ] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry


Labels:
name: Docs

Comments:
needs an update to the doc string as well

Updated docstring

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13533?src=pr) is **84.33%**

> Merging [#13533](https://codecov.io/gh/pydata/pandas/pull/13533?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13533   diff @@
==========================================
  Files           138        138          
  Lines         51111      51111          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43107      43107          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [3944a36...8402b95](https://codecov.io/gh/pydata/pandas/compare/3944a369265f27268d1b3867a161e97f9c63cd62...8402b954d8e74a61fa34be6e719e2058f7c17661)

@gliptak A small grammatical comment, otherwise looks good!

Thanks!
DOC: update brief documentation on visualization projects
State: closed

- [ X] passes `git diff upstream/master | flake8 --diff`

Minor Documentaion change to note that Vincent project has intentionally been abandoned and is not longer maintained.  Add a pointer to IPython Vega successor.


Labels:
name: Docs

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13528?src=pr) is **84.33%**

> Merging [#13528](https://codecov.io/gh/pydata/pandas/pull/13528?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13528   diff @@
==========================================
  Files           138        138          
  Lines         51107      51107          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43103      43103          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [9e73c71...b1fbee0](https://codecov.io/gh/pydata/pandas/compare/9e73c714433fe071a4441bf1e22dd6c01bd01717...b1fbee0fb810239f0c4d03ae10aef231e0a1d13d)

Thanks!
Fixes a missing ".reshape" call
State: closed

closes https://github.com/pydata/pandas/issues/13287

Currently, some 2D arrays can go into [_possibly_infer_to_datetimelike](https://github.com/andyljones/pandas/blob/59b9e835d49036cabad19cf2c53140ac9f2eb465/pandas/core/common.py#L1133-L1222) and come out 1D. The issue is that the input is ravelled [at one point](https://github.com/andyljones/pandas/blob/59b9e835d49036cabad19cf2c53140ac9f2eb465/pandas/core/common.py#L1165), but only unravelled back to it's original form [if a certain path it taken through the function](https://github.com/andyljones/pandas/blob/59b9e835d49036cabad19cf2c53140ac9f2eb465/pandas/core/common.py#L1187). This pull request adds the same `.reshape(shape)` call to the _other_ path through the function.


Labels:
name: Datetime
description: Datetime data dtype
name: Reshaping
description: Concat, Merge/Join, Stack/Unstack, Explode

Comments:
tests!

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13525?src=pr) is **84.33%**

> Merging [#13525](https://codecov.io/gh/pydata/pandas/pull/13525?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will not change coverage

``` diff
@@             master     #13525   diff @@
==========================================
  Files           138        138          
  Lines         51107      51107          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43103      43103          
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [1a9abc4...59b9e83](https://codecov.io/gh/pydata/pandas/compare/1a9abc44bbfd65675fd99701fe33aad8805ab147...59b9e835d49036cabad19cf2c53140ac9f2eb465)

this is actually a non-trivial issue, I suspect this fix will work partially. But need a fair amount of tests.

pls reopen if you want to complete
ENH: Allow dict as the argument to Index.map (GH13517)
State: closed

- [X] closes #13517
- [X] tests added / passed
- [X] passes `git diff upstream/master | flake8 --diff`
- [X] whatsnew entry


Labels:
name: Enhancement
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13518?src=pr) is **84.33%**

> Merging [#13518](https://codecov.io/gh/pydata/pandas/pull/13518?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13518   diff @@
==========================================
  Files           138        138          
  Lines         51107      51110     +3   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43103      43106     +3   
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [bf4786a...0b32709](https://codecov.io/gh/pydata/pandas/compare/bf4786a15f51d14ccf1318e44ae080868d8595ee...0b327096830e54b741f15737e344fb0fdf67aac9)

I would ideally like to merge the `Series.map` and `Index.map` impl and move it to `Base.map` like most other methods. You can move tests to `tests/test_base/py:TestIndexOps`. This will make these more consistent.

can you rebase / update?

closing, but pls reopen / comment if you can continue
BUG: Can't store callables using __setitem__
State: closed

- [X] closes #13299
- [X] tests added / passed
- [X] passes `git diff upstream/master | flake8 --diff`
- [X] whatsnew entry


Labels:
name: Bug
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: API Design

Comments:
yeah that's a better soln

lgtm.

lgtm. @jorisvandenbossche 

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13516?src=pr) is **84.34%**

> Merging [#13516](https://codecov.io/gh/pydata/pandas/pull/13516?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13516   diff @@
==========================================
  Files           138        138          
  Lines         51107      51113     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43103      43109     +6   
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [bf4786a...2a6607a](https://codecov.io/gh/pydata/pandas/compare/bf4786a15f51d14ccf1318e44ae080868d8595ee...2a6607aae9119fbd02f25c61adf98bd1cb74b50a)

Thanks a lot!
To numeric enhance
State: closed

This is a test PR copy of #13425 to test travis - do not merge


Labels:

Comments:
## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13512?src=pr) is **84.34%**

> Merging [#13512](https://codecov.io/gh/pydata/pandas/pull/13512?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13512   diff @@
==========================================
  Files           138        138          
  Lines         51107      51113     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43103      43109     +6   
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [bf4786a...ac37bd4](https://codecov.io/gh/pydata/pandas/compare/bf4786a15f51d14ccf1318e44ae080868d8595ee...ac37bd45fd35a5c743d9e76fd4e0b446870ce66b)
BUG: date_range closed keyword with timezone aware start/end (GH12684)
State: closed

closes #12684


Labels:
name: Bug
name: Datetime
description: Datetime data dtype

Comments:
lgtm

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13510?src=pr) is **84.33%**

> Merging [#13510](https://codecov.io/gh/pydata/pandas/pull/13510?src=pr) into [master](https://codecov.io/gh/pydata/pandas/branch/master?src=pr) will increase coverage by **<.01%**

``` diff
@@             master     #13510   diff @@
==========================================
  Files           138        138          
  Lines         51107      51111     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43103      43107     +4   
  Misses         8004       8004          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last updated by [bf4786a...d5744f7](https://codecov.io/gh/pydata/pandas/compare/bf4786a15f51d14ccf1318e44ae080868d8595ee...d5744f7f8df643b6aaf1befeeafcd33d4ed0a831)
mmap error is not always returned in English
State: closed

Fixes a build error from https://github.com/pydata/pandas/pull/12946 caused by mmap error being returned in Italian when `LOCALE_OVERRIDE="it_IT.UTF-8"`. The test fails with:

`AssertionError: "Invalid argument" does not match "[Errno 22] Argomento non valido"`

``` python
        msg = "Invalid argument"
        tm.assertRaisesRegexp(mmap.error, msg, common.MMapWrapper, non_file)
```

i.e. message is not being matched. Change to match the errno instead as that's the same across languages. 


Labels:
name: Compat
description: pandas objects compatability with Numpy or Python functions

Comments:
this is fine, though equally could have just skipped this when locale is set.