BrandonFors/pandas-github-issues huggingface dataset:
BUG: Fixed incorrect stream size check (#14125)
State: closed

 - [X] closes #14125 
 - [X] tests added / passed:  test_large_difference_in_columns in c_parser_only.py, Other tests passed.
 - [X] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry: Added to 0.20 whatsnew

Issue summary: Previously, self->stream_cap was copied into a local variable called maxstreamsize each time tokenize_bytes ran, and then this was checked in the PUSH_CHAR macro. However, there is one other place in the file where function make_stream_space() is called (in end_line()), and when this happens self->stream_cap is increased but maxstreamsize is not updated, making the check incorrect. In rare circumstances (see original issue or test case) this could cause a crash. The resolution is to just check self->stream_cap directly.

Labels:
name: Bug
name: IO CSV
description: read_csv, to_csv

Comments:
can you add the test from the issue?
I can, but a few things to consider first:
The test case from the issue does not follow a simple pattern, and it contains a row that is ~1000 characters long. So putting it into the test file is possible but would look kind of ugly. The test I had added instead causes the same issue, is a little easier to understand since it follows a pattern, and fits nicely into the test suite (in terms of formatting).

So with that said, do you still want the original test? If so, in an external file or directly in the script?
@jeffcarey oh if it replicates that is fine then. thanks!
can you add a whatsnew note? ping when you push (as this is already validated).
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15195?src=pr) is 85.97% (diff: 100%)


> No coverage report found for **master** at 9309eba.

> Powered by [Codecov](https://codecov.io?src=pr). Last update [9309eba...38c0cce](https://codecov.io/gh/pandas-dev/pandas/compare/9309ebae91ca580d54a7d3d8d2b9db7df5e0d72b...38c0cce4864e8c80463713dcab11bcd40dfba408?src=pr)
@jreback whatsnew note has been added.
thanks @jeffcarey !

keep em coming!
Relocate exceptions #14800
State: closed

 - [x] closes #14800
 - [x] tests added / passed
 - [x] passes ``git diff master | flake8 --diff``
 - [x] whatsnew entry

Deprecation warnings will only be issued when exceptions/warnings are raised. I did think of 
putting a deprecation warning in ``pandas.common.core`` indicating that these exceptions 
were deprecated but these would be seen when *anything* was imported from ``pandas.core.common``. Please advise.

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

Comments:
I think we had the same problem before (I seem to remember this from #14479), but decorating exceptions does not seem to work in practice:

```
In [1]: from pandas.core.common import UnsortedIndexError

In [2]: try:
   ...:     raise pd.api.exceptions.UnsortedIndexError()
   ...: except UnsortedIndexError:
   ...:     print('catched')
   ...:     
---------------------------------------------------------------------------
UnsortedIndexError                        Traceback (most recent call last)
<ipython-input-2-c3dad543bd57> in <module>()
      1 try:
----> 2     raise pd.api.exceptions.UnsortedIndexError()
      3 except UnsortedIndexError:

UnsortedIndexError: 

During handling of the above exception, another exception occurred:

TypeError                                 Traceback (most recent call last)
<ipython-input-2-c3dad543bd57> in <module>()
      1 try:
      2     raise pd.api.exceptions.UnsortedIndexError()
----> 3 except UnsortedIndexError:
      4     print('gevangen')
      5 

TypeError: catching classes that do not inherit from BaseException is not allowed
```
O.K. Will wait further instructions.
so I think what you have to do here, is add an option to ``_DeprecatedModule`` to allow it to function as an entire proxy module, but not to show the deprecation warning, except on the removals.

IOW, we want to proxy ``pandas.core.common``, and if its a ``_removals``, then show the deprecation message.

So if you add an option (default it to True), to show the ``DeprecationWarning`` for the module itself (but when you call it here, you will pass False). add the ``_removals`` for the exceptions, this could work.

the ``_add_proxy`` is wrapping a function around the exception which doesn't work (and I don't think we are actually using this anywhere)
closing in favor of #15541
BLD: Remove csv dialect warning in io.rst
State: closed

Title is self-explanatory.

xref <a href="https://github.com/pandas-dev/pandas/pull/14911#issuecomment-273896473">#14911 (comment)</a>.

Labels:
name: Docs
name: IO CSV
description: read_csv, to_csv

Comments:
maybe I wasn't clear. Is this a legit warning? 
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15177?src=pr) is 85.54% (diff: 100%)
> Merging [#15177](https://codecov.io/gh/pandas-dev/pandas/pull/15177?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

```diff
@@             master     #15177   diff @@
==========================================
  Files           145        145          
  Lines         51406      51406          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43978      43977     -1   
- Misses         7428       7429     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [d50eaa8...1ac6c20](https://codecov.io/gh/pandas-dev/pandas/compare/d50eaa8ac6e18a64d9fa403e8e263344a5208227...1ac6c20b08c28c6db64a83a6d550747be90fd7c0?src=pr)
IMO it should not warn. But that was what I advocated for in the PR #14911, and I lost that argument ..

So @jreback "is this a legit warning?", yes, given how we merged the PR, this warning is expected and not really avoidable (just annoying and IMO unnecessary). So using `:okwarning:` is the right thing to do then.
ok then
thanks!
DOC: add subsequent_indent to wrapped text
State: closed

Hey guys,

This should fix the parsing error in the [read_csv documentation](http://pandas.pydata.org/pandas-docs/stable/generated/pandas.read_csv.html#pandas.read_csv) :

![image](https://cloud.githubusercontent.com/assets/5640848/22127326/c84fa65c-de9b-11e6-8702-5c01e8ce4d22.png)

`fill` wraps the line to 70 characters (what's left after the beginning of the line) but it wasn't indenting the subsequent line, so the parser was marking it as a new parameter (in bold).

This PR adds the missing indent, which should fix the parsing.

Labels:
name: Docs

Comments:
![LGTM](https://dl.dropboxusercontent.com/u/21859073/lgtm_choco.gif) 
@thoralf-gutierrez Thanks!
DOC: Clarified wording of coerce_float
State: closed

I think this is the intended meaning (and it matches with use).

Labels:
name: Docs
name: IO SQL
description: to_sql, read_sql, read_sql_query

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15164?src=pr) is 85.54% (diff: 100%)
> Merging [#15164](https://codecov.io/gh/pandas-dev/pandas/pull/15164?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will not change coverage

```diff
@@             master     #15164   diff @@
==========================================
  Files           145        145          
  Lines         51404      51404          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43976      43976          
  Misses         7428       7428          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [684c4d5...a886538](https://codecov.io/gh/pandas-dev/pandas/compare/684c4d5f5c81e90d3cf07d1c5f1bc7c98266333a...a886538883e87f6d48547c161042ec256725d78f?src=pr)
thanks!
Bug in groupby.get_group on categoricalindex
State: closed

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


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

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15163?src=pr) is 85.54% (diff: 100%)


> No coverage report found for **master** at 77518d8.

> Powered by [Codecov](https://codecov.io?src=pr). Last update [77518d8...742d4a5](https://codecov.io/gh/pandas-dev/pandas/compare/77518d83fcf2c15eb4efc85a1ba34fe9ed805d45...742d4a52d4db55793f6ca20014b619b5979627b9?src=pr)
thanks @watercrossing 

if you are interested in working on #15166 would be great!
BUG, TST: Patch handling of uint64 in algorithms
State: closed

1) Patches handling of `uint64` in `value_counts`
2) Adds tests for handling of `uint64` in `factorize`

xref #14934

Labels:
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: Algos
description: Non-arithmetic algos: value_counts, factorize, sorting, isin, clip, shift, diff

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15162?src=pr) is 85.68% (diff: 100%)
> Merging [#15162](https://codecov.io/gh/pandas-dev/pandas/pull/15162?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

```diff
@@             master     #15162   diff @@
==========================================
  Files           145        145          
  Lines         51419      51427     +8   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          44057      44066     +9   
+ Misses         7362       7361     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [97fd744...1fb256b](https://codecov.io/gh/pandas-dev/pandas/compare/97fd7447ff54d8f964d057dbaad2b5caa362e24d...1fb256be46a35d80d05edaa82cafee8c164adb58?src=pr)
this looks pretty good. prob some cases to care about after though. ping when updated tests as above.
thanks @gfyoung !
Apply fontsize to both x- and y-axis tick labels
State: closed

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


Labels:
name: Visualization
description: plotting

Comments:
Pls add tests to check font size, using ``_check_ticks_props``.
Sure - I added a test for both `TestDataFramePlots` and `TestDataFrameGroupByPlots`. Let me know if only one test (the former?) is sufficient though.
lgtm. pls add whats new note.

@TomAugspurger ?
OK - I hope this was the right place to add the note.
Thanks!
BUG: unicode characters when reading JSON lines
State: closed

Fixes UnicodeDecodeError bug when reading JSON lines input with Ascii decoder, which is often the default setting in Python 2.7. Avoids issues with mixing unicode and ascii strings.

xref #15132

 - [x] closes #15132
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry


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

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15149?src=pr) is 85.54% (diff: 100%)
> Merging [#15149](https://codecov.io/gh/pandas-dev/pandas/pull/15149?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

```diff
@@             master     #15149   diff @@
==========================================
  Files           145        145          
  Lines         51404      51404          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43975      43976     +1   
+ Misses         7429       7428     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [8e13da2...e117889](https://codecov.io/gh/pandas-dev/pandas/compare/8e13da24818dffaec88321a75a1e728b50a642f2...e1178894a9f74a3e2e3369f5cd36624205085b36?src=pr)
lgtm. ping on green.
@jreback: all green here.
thanks!
BUG: Segfault due to float_precision='round_trip'
State: closed

`round_trip` calls back into Python, so the GIL must be held.  It also fails to silence the Python exception, leading to spurious errors.

Closes #15140.

 - [x] closes #xxxx
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff`` (*Most of them are false positives because flake8 doesn't understand Cython or it was code I didn't even touch*)
 - [x] whatsnew entry


Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions
name: IO CSV
description: read_csv, to_csv

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15148?src=pr) is 85.54% (diff: 100%)


> No coverage report found for **master** at d50eaa8.

> Powered by [Codecov](https://codecov.io?src=pr). Last update [d50eaa8...652c14c](https://codecov.io/gh/pandas-dev/pandas/compare/d50eaa8ac6e18a64d9fa403e8e263344a5208227...652c14ce31a0cee415098526c2578e782774702e?src=pr)
Updated.
lgtm
ping on green
thanks @Rufflewind
Categoricals hash consistently
State: closed

Previously categorical values were hashed using just their codes. This
meant that the hash value depended on the ordering of the categories,
rather than on the values the series represented. This caused problems
in dask, where different partitions might have different categorical
mappings.

This PR makes the hashing dependent on the values the categorical
represents, rather than on the codes. The categories are first hashed,
and then the codes are remapped to the hashed values. This is slightly
slower than before (still need to hash the categories, where we didn't
before), but allows for more consistent hashing.

Related to this work in dask: https://github.com/dask/dask/pull/1877.

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

Comments:
Thanks for the review. Addressed all comments.
lgtm.

ping on green. (note appveyor is currently recovering, so may take a while) :<
Windows tests passed, travis failures look unrelated?
thanks @jcrist
CLN/DEPR: remove deprecated pandas.rpy module (GH9602)
State: closed

Closes #9602

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

Comments:
just a doc comment, otherwise lgtm.
good to go?
it's nice to update ecosystem doc to describe rpy2 and PypeR.
@sinhrks do you know how maintained PypeR is, and whether pandas is supported well or not?

@jorisvandenbossche their website is below, but can't find actual repo (looks to be not maintainanced 2014)? 

http://www.webarray.org/softwares/PypeR/

The package has ``use_pandas`` to handle ``DataFrame`` and ``Series``. From their source impl, ``rpy2`` is expected to work better.

```
        use_pandas: Used as a boolean value. A False value will disable pandas
            even if it has been imported. 
```

Pls drop ``PypeR`` description if it is not appropriate.


## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15142?src=pr) is 85.97% (diff: 100%)
> Merging [#15142](https://codecov.io/gh/pandas-dev/pandas/pull/15142?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **0.28%**

```diff
@@             master     #15142   diff @@
==========================================
  Files           145        140     -5   
  Lines         51430      51244   -186   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          44070      44057    -13   
+ Misses         7360       7187   -173   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [2fa33fb...e9d2d10](https://codecov.io/gh/pandas-dev/pandas/compare/2fa33fbddf4ae40b2dd47e146444a41bd6bccd6e...e9d2d109161ae79ed518a78c19890bcdeaa4238a?src=pr)
http://pandas-docs.github.io/pandas-docs-travis/r_interface.html#rpy

something not defined here?
Hmm, sigh. This worked locally, but I now see this only worked because I didn't activate pandas2ri. But if I don't activate pandas2ri, the second example does not work. I can't really get my head around rpy2's conversion/activate/dispatch rules and object model .. 
(will do a PR to fix this)
BUG: Allow tolerance when left_index/right_index enabled for merge_asof() (#15135)
State: closed

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

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

Comments:
thanks!
MAINT: remove shebang from test modules
State: closed

 - [x] closes #15131 

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

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15134?src=pr) is 85.53% (diff: 100%)
> Merging [#15134](https://codecov.io/gh/pandas-dev/pandas/pull/15134?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

```diff
@@             master     #15134   diff @@
==========================================
  Files           145        145          
  Lines         51288      51288          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43872      43871     -1   
- Misses         7416       7417     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [1f82f18...3b6c960](https://codecov.io/gh/pandas-dev/pandas/compare/1f82f18933e42f0c9695b551cfce98cd1632f841...3b6c960f0f93eee29381ba6e7ef9e3f39851288a?src=pr)
thanks!
ENH: Added 'direction' parameter to merge_asof() (#14887)
State: closed

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

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

Comments:
lgtm (minor doc-comment). already green (appeveyor seems stuck, working on that indepdendtly). so ping when pushed.

also just verify that perf is the same.
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15129?src=pr) is 86.26% (diff: 88.88%)
> Merging [#15129](https://codecov.io/gh/pandas-dev/pandas/pull/15129?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **0.72%**

```diff
@@             master     #15129   diff @@
==========================================
  Files           145        145           
  Lines         51274      54303   +3029   
  Methods           0          0           
  Messages          0          0           
  Branches          0          0           
==========================================
+ Hits          43857      46844   +2987   
- Misses         7417       7459     +42   
  Partials          0          0           
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [5a0eb5a...879c9f0](https://codecov.io/gh/pandas-dev/pandas/compare/5a0eb5ad4cae2818c01f46b79121b992f98eeae4...879c9f02d6467e7cdd64e2333b2eb2a3cd2a8ba4?src=pr)
@jreback I've pushed the bullet-pointed description. ASV came-out the same, which I would expect since the "backward" direction is the same code.
thanks!
BUG: Fix Series constructor when copy=True
State: closed

Updates Series constructor to include copy argument when dtype argument
is also provided. Adds tests for copy parameter.

xref #15125

 - [x] closes #15125
 - [x] tests added / passed
 - [x] passes ``git diff upstream/master | flake8 --diff``
 - [x] whatsnew entry


Labels:
name: Bug
name: Dtype Conversions
description: Unexpected or buggy dtype conversions

Comments:
minor comments. ping when updated / green.
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15128?src=pr) is 85.53% (diff: 100%)
> Merging [#15128](https://codecov.io/gh/pandas-dev/pandas/pull/15128?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will decrease coverage by **<.01%**

```diff
@@             master     #15128   diff @@
==========================================
  Files           145        145          
  Lines         51288      51288          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43872      43871     -1   
- Misses         7416       7417     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [1f82f18...7b0c959](https://codecov.io/gh/pandas-dev/pandas/compare/1f82f18933e42f0c9695b551cfce98cd1632f841...7b0c959930ae0e10d62a40520a7fed7b3ad9eff6?src=pr)
Thanks for pointing out the anti-pattern, @jreback. All green now. Let me know if you see any other changes.
thanks!
TST: tests.groupby needs to be a package to run tests
State: closed

skip parts of cummin test, xref #15109


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

Comments:
seems the tests.groupby dir was being *skipped* :<

cc @mroeschke now #15109 is relevant
you can just about see this, our codecov when from 85.3 to 84.5 when groupby tests dropped out :< https://codecov.io/gh/pandas-dev/pandas
BUG: catch overflow in timestamp + offset operations
State: closed

xref https://github.com/statsmodels/statsmodels/issues/3374


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

Comments:
## [Current coverage](https://codecov.io/gh/pandas-dev/pandas/pull/15126?src=pr) is 85.53% (diff: 100%)
> Merging [#15126](https://codecov.io/gh/pandas-dev/pandas/pull/15126?src=pr) into [master](https://codecov.io/gh/pandas-dev/pandas/branch/master?src=pr) will increase coverage by **<.01%**

```diff
@@             master     #15126   diff @@
==========================================
  Files           145        145          
  Lines         51274      51281     +7   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43856      43865     +9   
+ Misses         7418       7416     -2   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [e6a3c35...923eaa2](https://codecov.io/gh/pandas-dev/pandas/compare/e6a3c35d862d0b84366dbcb9fb28efa4b1251eac...923eaa2566a15f880a7dd3a70073a2cc06484405?src=pr)
BUG: pandas.Series.dt.round inconsistent behaviour on NAT's with different arguments
State: closed

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


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

Comments:
thanks!