Skip to content

BUG: Sparse creation with object dtype may raise TypeError #13201

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

sinhrks
Copy link
Member

@sinhrks sinhrks commented May 17, 2016

closes #11633
closes #11856

Added basic tests for groupby and pivot_table.

@sinhrks sinhrks added Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Sparse Sparse Data Type labels May 17, 2016
@sinhrks sinhrks added this to the 0.18.2 milestone May 17, 2016
subarr = np.array(values, dtype=dtype, copy=True)
try:
# ToDo: Can remove this error handling when we actually
# support other dtypes
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm, maybe this should be more integrated with _sanitize_values (or that should be enhanced). not a big deal, but feel free to reorg code to make more general / readable code.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can I leave this ATM, because this can be removed entirely after changing dtype default to None (#667).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes - was just bringing it up mainly for future / FYI

@codecov-io
Copy link

codecov-io commented May 17, 2016

Current coverage is 84.15%

Merging #13201 into master will increase coverage by <.01%

@@             master     #13201   diff @@
==========================================
  Files           138        138          
  Lines         50388      50394     +6   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
+ Hits          42386      42407    +21   
+ Misses         8002       7987    -15   
  Partials          0          0          

Powered by Codecov. Last updated by 4e4a7d9...443b47e

@jreback jreback closed this in 86f68e6 May 18, 2016
@jreback
Copy link
Contributor

jreback commented May 18, 2016

thanks @sinhrks very nice as usual

side-note (nothing to do with this PR I think, but should investigate at some point).

nosetests pandas/sparse
....
/Users/jreback/pandas/pandas/sparse/array.py:52: FutureWarning: comparison to `None` will result in an elementwise object comparison in the future.
  return _wrap_result(name, op(self.sp_values, other),

@sinhrks sinhrks deleted the sparse_isnull branch January 8, 2017 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Reshaping Concat, Merge/Join, Stack/Unstack, Explode Sparse Sparse Data Type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Pivot to SparseDataFrame: TypeError: ufunc 'isnan' not supported in sparse matrix conversion
3 participants