Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
API: SparseSeries comparison now returns sparse #13999
Conversation
sinhrks
added API Design Sparse
labels
Aug 14, 2016
sinhrks
added this to the
0.19.0
milestone
Aug 14, 2016
codecov-io
commented
Aug 14, 2016
•
Current coverage is 85.25% (diff: 100%)@@ master #13999 diff @@
==========================================
Files 139 139
Lines 50380 50384 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 42953 42955 +2
- Misses 7427 7429 +2
Partials 0 0
|
jreback
commented on an outdated diff
Aug 15, 2016
| @@ -762,6 +762,8 @@ Note that the limitation is applied to ``fill_value`` which default is ``np.nan` | ||
| ValueError: unable to coerce current fill_value nan to int64 dtype | ||
| - Subclassed ``SparseDataFrame`` and ``SparseSeries`` now preserve class types when slicing or transposing. (:issue:`13787`) | ||
| +- ``SparseSeries`` comparison now changed to return ``SparseSeries`` (:issue:`13999`) |
|
|
jreback
commented on an outdated diff
Aug 15, 2016
| @@ -771,6 +773,7 @@ Note that the limitation is applied to ``fill_value`` which default is ``np.nan` | ||
| - Bug in ``SparseSeries.abs`` incorrectly keeps negative ``fill_value`` (:issue:`13853`) | ||
| - Bug in single row slicing on multi-type ``SparseDataFrame``s, types were previously forced to float (:issue:`13917`) | ||
| - Bug in sparse indexing using ``SparseArray`` with ``bool`` dtype may return incorrect result (:issue:`13985`) | ||
| +- Bug in ``SparseArray`` creatd from ``SparseSeries`` may lose ``dtype`` (:issue:`13999`) |
|
|
jreback
commented on an outdated diff
Aug 15, 2016
| @@ -762,6 +762,8 @@ Note that the limitation is applied to ``fill_value`` which default is ``np.nan` | ||
| ValueError: unable to coerce current fill_value nan to int64 dtype | ||
| - Subclassed ``SparseDataFrame`` and ``SparseSeries`` now preserve class types when slicing or transposing. (:issue:`13787`) | ||
| +- ``SparseSeries`` comparison now changed to return ``SparseSeries`` (:issue:`13999`) | ||
| + |
|
|
jreback
commented on an outdated diff
Aug 18, 2016
| @@ -102,6 +102,29 @@ def test_constructor_spindex_dtype(self): | ||
| self.assertEqual(arr.dtype, np.int64) | ||
| self.assertEqual(arr.fill_value, 0) | ||
| + def test_sparseseries_roundtrip(self): | ||
| + # GH 13999 | ||
| + for kind in ['integer', 'block']: | ||
| + for fill in [1, np.nan, 0]: | ||
| + arr = SparseArray([np.nan, 1, np.nan, 2, 3]) |
|
|
|
thanks! |
jreback
closed this
in 51b20de
Aug 20, 2016
sinhrks
deleted the
sinhrks:sparse_comparison branch
Aug 20, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
sinhrks commentedAug 14, 2016
git diff upstream/master | flake8 --diffBecause #13985 has been fixed,
SparseSeriescomparison op now can returnSparseSeries(it returns normalSerieson current master).also fixed a bug when
SparseArraycreated fromSparseSeriesmay not inheritdtype.