BrandonFors/pandas-github-issues huggingface dataset:
MAINT: Nicer error msg for NULL byte in read_csv
State: closed

Provides a nicer error message for the Python engine in `read_csv` when the data contains a `NULL` byte.

Closes #2741.


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO CSV
description: read_csv, to_csv

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

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

``` diff
@@             master     #13859   diff @@
==========================================
  Files           140        140          
  Lines         50455      50460     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43014      43019     +5   
  Misses         7441       7441          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [59f2557...bce0b6b](https://codecov.io/gh/pydata/pandas/compare/59f25575f42e19f066dc3cd2245983071e2d7813...bce0b6b932555e957363ca78e61a0d266d077997?src=pr)

thanks @gfyoung
BUG: disallow 'w' mode in pd.read_hdf (#13623)
State: closed

- [x] closes #13623 
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry
  
  Passing mode='w' to read_hdf raises ValueError.


Labels:
name: Error Reporting
description: Incorrect or improved errors from pandas
name: IO HDF5
description: read_hdf, HDFStore

Comments:
needs tests

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

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

``` diff
@@             master     #13858   diff @@
==========================================
  Files           140        140          
  Lines         50455      50457     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43014      43017     +3   
+ Misses         7441       7440     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [59f2557...b03d90b](https://codecov.io/gh/pydata/pandas/compare/59f25575f42e19f066dc3cd2245983071e2d7813...b03d90b73c63deb13b0e87a9034420e118abbb38?src=pr)

The existing test cases check for r, r+, a and w modes. I have added a new test case to check read_hdf for default mode (i.e without mode argument given).

@iamsimha minor changes. ping when green.

@jreback I have made the changes.

thanks @iamsimha
CLN: Removed colSpace parameter
State: closed

Title is self-explanatory.  Seems like it was already done in `DataFrame.to_string()` some time ago.


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

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

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

``` diff
@@             master     #13857   diff @@
==========================================
  Files           140        140          
  Lines         50455      50455          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          43014      43014          
  Misses         7441       7441          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [59f2557...20de50d](https://codecov.io/gh/pydata/pandas/compare/59f25575f42e19f066dc3cd2245983071e2d7813...20de50d230c6ec1ed99c182a9260cf024a20e13c?src=pr)

amazing we don't have tests to remove :<
CLN: Removed trellis rplot
State: closed

xref https://github.com/pydata/pandas/pull/9357.

Title is self-explanatory.


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

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

> No coverage report found for **master** at a7f7e1d.
> 
> Powered by [Codecov](https://codecov.io?src=pr). Last update [a7f7e1d...9666d4d](https://codecov.io/gh/pydata/pandas/compare/a7f7e1d18baa36afe9317aa48fbcf170b0375318...9666d4d119e95882eb4b97338ce0b6677969f80d?src=pr)

I would just remove that entire doc section (or maybe leave in the note it was removed, and put a link to the doc section of the previous release). 
If you would keep it, you have to include the png files.

@jorisvandenbossche : I updated the documentation to include a link to the documentation in `0.18.1`.  I'm not sure that that is the right link though (in terms of format).  How can you even see old versions of the documentation online?

http://pandas.pydata.org/pandas-docs/version/0.18.1/

You can access it from the front page (pandas.pydata.org)

Okay, good to know!  Updated the documentation, so ready to merge if there are no other concerns.

is there an issue for this? can you reference at the top.

There is no associated issue for it.

sure there is; updated.

Where?  I don't see any issue for removing this.

no we reference the issue that deprecated this, which is what I did.

Ah, I see.  Made the doc change FYI.

thanks!
BUG: ufunc is not applied to sparse.fill_value
State: closed

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

When ufunc is applied to sparse, it is not applied to `fill_value`. Thus results are incorrect.

**on current master:**

```
np.abs(pd.SparseArray([1, -2, -1], fill_value=-2))
# [1.0, -2, 1.0]
# Fill: -2
# IntIndex
# Indices: array([0, 2], dtype=int32)

np.add(pd.SparseArray([1, -2, -1], fill_value=-2), 1)
# [2.0, -2, 0.0]
# Fill: -2
# IntIndex
# Indices: array([0, 2], dtype=int32)
```

cc @gfyoung 


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

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

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

``` diff
@@             master     #13853   diff @@
==========================================
  Files           139        139          
  Lines         50020      50031    +11   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42657      42666     +9   
- Misses         7363       7365     +2   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [97de42a...a14f573](https://codecov.io/gh/pydata/pandas/compare/97de42abbea588fc5a46be5c58788958fd817b7f...a14f57304fdb913fb1622b7469c4734610caeb6e?src=pr)

LGTM

cc @jreback

I understand why this is needed, but it feels a tad unnatural. I am not sure a user will be expecting that the fill value will have the ufunc be applied here. Can we add a section to the docs showing this?

Sure, added small section.
BUG: Fixed float parsing with unit when using pd.to_datetime (GH13834)
State: closed

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


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

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

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

``` diff
@@             master     #13847   diff @@
==========================================
  Files           139        139          
  Lines         50157      50157          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          42785      42784     -1   
- Misses         7372       7373     +1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [b7abef4...54a26ee](https://codecov.io/gh/pydata/pandas/compare/b7abef4949fb1ba7fd1004feba4f47ace7004282...54a26eee9089c24b5442a4654aab7fa116d4fe19?src=pr)

@wcwagner can you update according to @chris-b1 suggestion

Having trouble w/ my laptop recently, so sorry for slow response. Please lmk if there's anything else, I will try to fix anything asap. 

Thanks for the suggestion @chris-b1 

@jreback everything good here?

lgtm. ping when fixed / green.

@jreback

just about to merge this and I saw:
which don't look right

```
In [8]: pd.to_datetime(1000.1,unit='D').value
Out[8]: 86400000000000000

In [9]: pd.to_datetime(1000.1,unit='s').value
Out[9]: 1000000000000
```

@wcwagner nvm my last.....didn't compile the extension :<

thanks @wcwagner
ENH: add sort_categories argument to union_categoricals
State: closed

- needed for #13406, follow-up to #13763
- [ ] tests added / passed
- [ ] passes `git diff upstream/master | flake8 --diff`
- [ ] whatsnew entry

cc: @janschulz, @sinhrks 


Labels:
name: Enhancement
name: Categorical
description: Categorical Data Type

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

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

``` diff
@@             master     #13846   diff @@
==========================================
  Files           140        139     -1   
  Lines         50455      50020   -435   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits          43014      42659   -355   
+ Misses         7441       7361    -80   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [59f2557...3a710f0](https://codecov.io/gh/pydata/pandas/compare/59f25575f42e19f066dc3cd2245983071e2d7813...3a710f082fd2e5f94866418eb624d3e3ae391791?src=pr)

can you add this issue to the whatsnew (just add on to same line where `union_categoricals` is)

lgtm. @sinhrks pls have a look.

lgtm. pls fix the lint issue:)

@sinhrks - updated, thanks!

thanks!
BUG: fixes 13822, incorrect KeyError string with non-unique columns w…
State: closed

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

Made changes to fix the bug related to accessing columns in a df with duplicate columns where the KeyError string was returning the wrong column. 

The test that I added passed, but there seems to be a test that won't pass and I wasn't sure what's going on. Even on a clean master, when I run "nosetests pandas/tests/indexing/test_indexing.py" I get "ERROR: test_float64index_slicing_bug (pandas.tests.indexing.test_indexing.TestIndexing)". 


Labels:
name: Indexing
description: Related to indexing on series/frames, not to indexes themselves
name: Error Reporting
description: Incorrect or improved errors from pandas

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

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

``` diff
@@             master     #13845   diff @@
==========================================
  Files           140        140          
  Lines         50455      50456     +1   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43014      43016     +2   
+ Misses         7441       7440     -1   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [59f2557...ae56be0](https://codecov.io/gh/pydata/pandas/compare/59f25575f42e19f066dc3cd2245983071e2d7813...ae56be04aa3d1b2d7e52a8bda738d24974c10365?src=pr)

thanks!
TST: A test to cover fault in issue #5291
State: closed

The mentioned issue faulted under similar conditions as issue #13703, and was also fixed by PR #13788. This PR just adds a test to replicate the fault, as discussed in the issue's thread.
- [x] closes #5291
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`
- [x] whatsnew entry

This PR also corrects accidental use of **float("nan")** instead of **np.nan** in [`test_parse_trim_buffers`](https://github.com/pydata/pandas/blob/master/pandas/io/tests/parser/c_parser_only.py#L442).


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO CSV
description: read_csv, to_csv

Comments:
I think this PR and PR #13788 also close the issue #11793.

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

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

``` diff
@@             master     #13833   diff @@
==========================================
  Files           140        140          
  Lines         50451      50455     +4   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          43003      43015    +12   
+ Misses         7448       7440     -8   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [b2a1445...4a74d50](https://codecov.io/gh/pydata/pandas/compare/b2a14459cf97af53ecc5edf51659ce3a9f1125b4...4a74d50c75cfb827f3c2b3b6d2605249dfe80c90?src=pr)
COMPAT: Categorical Subclassing
State: closed

- [x] related to #8640
- [x] tests added / passed
- [x] passes `git diff upstream/master | flake8 --diff`

It allows to subclass `Categorical` related to #8640.  Shoud it use `_simple_new` or `_constructor`?


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

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

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

``` diff
@@             master     #13827   diff @@
==========================================
  Files           139        139          
  Lines         50057      50062     +5   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42692      42695     +3   
- Misses         7365       7367     +2   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [45d54d0...13c456c](https://codecov.io/gh/pydata/pandas/compare/45d54d067ed9a0dfdb456f253fb0bede9969187c...13c456cfd804675c8b14fa79cc830ff8952b1e9e?src=pr)

The changes in this PR are fine, but I'm not sure it's a good idea to subclassing Categorical in the API, though I would guess nothing major is likely to change before v2.0. `Categorical` is diving pretty far into pandas internals.

It may better to discuss in #8640, I' m thinking the following stricture:
- CategoricalMixin ( move internal methods related to `_categories` and `_codes`)
  - Categorical (no API change)
  - String (automatically handle `_categories`, `_codes` and `.str` methods)

I don't think we have to wait for 2.0 as long as it does't break existing user's code, but it also should be discussed separatelly (in ML).

Updated to use `_constructor` and added small number of tests.

ty!
BLD: use tempita for hashtable
State: closed

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


Labels:
name: Build
description: Library building on various platforms
name: Clean

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

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

``` diff
@@             master     #13815   diff @@
==========================================
  Files           140        140          
  Lines         50420      50420          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
  Hits          42975      42975          
  Misses         7445       7445          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [cc216ad...912aff8](https://codecov.io/gh/pydata/pandas/compare/cc216ada82a2b06a52524da7b1559a7f5e31b1c1...912aff87f7d5c14e32c507696b1b73505d6d67d5?src=pr)

be sure to add to the linter as well.

@jreback OK. linting is enabled for all `src/*.pxi.in` by default.
- https://github.com/pydata/pandas/blob/master/ci/lint.sh#L35

thanks @sinhrks I know you wanted to add other types (e.g. int32), so can make another issue for that, but this is great.
TST: AmbiguousTimeError with set_index()
State: closed

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

this has been fixed by #13750. added tests.


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

Comments:
One typo, looks good!

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

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

``` diff
@@             master     #13814   diff @@
==========================================
  Files           140        140          
  Lines         50420      50420          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42974      42976     +2   
+ Misses         7446       7444     -2   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [31f8e4d...f6696ff](https://codecov.io/gh/pydata/pandas/compare/31f8e4dc8af8f0d109f366d0b726aef210bf7904...f6696ffacdba82b203cd425e1ba6d527ccbd9ed1?src=pr)

thanks!
BUG, COMPAT: Fix multi-char sep + non-utf8 in read_csv for Python 2
State: closed

Title is self-explanatory.  Closes #3404.


Labels:
name: Testing
description: pandas testing functions or related to the test suite
name: IO CSV
description: read_csv, to_csv

Comments:
Not sure if so many different ones to test is not overkill, but looks good, thanks

@jorisvandenbossche : it was a good thing you asked about a specific test.  You caught a Python 2 bug.  Turns out when we have a `StringIO` (the Python 2 `BytesIO`) of encoded data, we can't wrap it with a `TextIOWrapper` and pass in the `encoding` parameter like we do in Python 3 so that we can decode it.

Normally, this would in fact be taken care by `CsvReader`, BUT that's only for standard delimiters.  When we have a multi-char separator, we have to resort to an ad-hoc method of creating a generator, which does zero decoding.

In short, replace the `Testing` label with the `Bug` and `Compat` labels.

## [Current coverage](https://codecov.io/gh/pydata/pandas/pull/13812?src=pr) is 85.23% (diff: 50.00%)

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

``` diff
@@             master     #13812   diff @@
==========================================
  Files           140        140          
  Lines         50420      50422     +2   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42975      42977     +2   
  Misses         7445       7445          
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [cc216ad...e085fef](https://codecov.io/gh/pydata/pandas/compare/cc216ada82a2b06a52524da7b1559a7f5e31b1c1...e085fef5fa737b93d2980ff9076df19fe7da815f?src=pr)

@jorisvandenbossche : Squashed the bug, and Travis is passing <a href="https://travis-ci.org/pydata/pandas/builds/147951933">here</a> (had to make a doc change after, hence the `[ci skip]`).  Ready to merge if there are no concerns.

thanks @gfyoung
DOC: Fix groupby nth
State: closed

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

Current API doc looks incorrect. Fixed it to meet #11039. 
- http://pandas-docs.github.io/pandas-docs-travis/generated/pandas.core.groupby.GroupBy.nth.html

cc @behzadnouri 


Labels:
name: Docs
name: Groupby

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

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

``` diff
@@             master     #13810   diff @@
==========================================
  Files           140        140          
  Lines         50420      50420          
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42974      42976     +2   
+ Misses         7446       7444     -2   
  Partials          0          0          
```

> Powered by [Codecov](https://codecov.io?src=pr). Last update [31f8e4d...948255b](https://codecov.io/gh/pydata/pandas/compare/31f8e4dc8af8f0d109f366d0b726aef210bf7904...948255b4835eae0eff850676aa6edc289f247ca6?src=pr)

Can you show an example with `as_index=False` as well?

@jorisvandenbossche good idea. added.

thanks!