Skip to content

BUG/API: Raise when extension class passed to astype #17796

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

Merged
merged 1 commit into from
Oct 5, 2017

Conversation

TomAugspurger
Copy link
Contributor

Closes #17780

@TomAugspurger TomAugspurger added this to the 0.21.0 milestone Oct 5, 2017
@TomAugspurger TomAugspurger added the Dtype Conversions Unexpected or buggy dtype conversions label Oct 5, 2017
@TomAugspurger
Copy link
Contributor Author

cc @jorisvandenbossche @jreback @toobaz

For the moment, I went with raising when an extension type class is passed instead of an instance. I'm happy to change the behavior here though if anyone disagrees. CategoricalDtype has an obvious "default" of CategoricalDtype(). DatetimeTZDtype doesn't really have a good default, so I decided to consistently raise an exception.

@codecov
Copy link

codecov bot commented Oct 5, 2017

Codecov Report

Merging #17796 into master will decrease coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #17796      +/-   ##
==========================================
- Coverage   91.24%   91.22%   -0.02%     
==========================================
  Files         163      163              
  Lines       49967    49971       +4     
==========================================
- Hits        45593    45588       -5     
- Misses       4374     4383       +9
Flag Coverage Δ
#multiple 89.03% <100%> (ø) ⬆️
#single 40.24% <50%> (-0.06%) ⬇️
Impacted Files Coverage Δ
pandas/core/internals.py 94.38% <100%> (ø) ⬆️
pandas/io/gbq.py 25% <0%> (-58.34%) ⬇️
pandas/core/frame.py 97.74% <0%> (-0.1%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 22515f5...e868d54. Read the comment docs.

@jreback jreback merged commit 556b791 into pandas-dev:master Oct 5, 2017
ghost pushed a commit to reef-technologies/pandas that referenced this pull request Oct 16, 2017
@TomAugspurger TomAugspurger deleted the cdt-astype branch October 27, 2017 12:04
alanbato pushed a commit to alanbato/pandas that referenced this pull request Nov 10, 2017
No-Stream pushed a commit to No-Stream/pandas that referenced this pull request Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Dtype Conversions Unexpected or buggy dtype conversions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants