Skip to content
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

BUG: invalid dtypes should raise #15520

Closed
jreback opened this issue Feb 27, 2017 · 5 comments
Closed

BUG: invalid dtypes should raise #15520

jreback opened this issue Feb 27, 2017 · 5 comments
Labels
Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Feb 27, 2017

xref dask/dask#1965

when an explict dtype is provided, we should raise if its not a valid numpy/pandas dtype.

In [1]: pd.Series([], name='time',dtype=pd.Timestamp)
Out[1]: Series([], Name: time, dtype: object)
@jreback jreback added Difficulty Novice Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas labels Feb 27, 2017
@jreback jreback added this to the Next Major Release milestone Feb 27, 2017
@petioptrv
Copy link
Contributor

Hi, I am looking into contributing to open source projects and this looks like a good first-time contibution to start with. I'd like to give it a try.

@jreback
Copy link
Contributor Author

jreback commented Mar 3, 2017

great

contributing docs are http://pandas.pydata.org/pandas-docs/stable/contributing.html

@trevorpburke
Copy link

Put in a pull request for this issue. This is my first contribution attempt, so please let me know if I'm way off base here.

@petioptrv
Copy link
Contributor

Should be addressing this at the source of the problem (raise anytime a function passes a non-valid dtype), or should we raise only when this happens in a Series function call?

@petioptrv
Copy link
Contributor

Here is my suggestion for this issue: 607ae9c

analyticalmonk pushed a commit to analyticalmonk/pandas that referenced this issue Apr 18, 2017
analyticalmonk pushed a commit to analyticalmonk/pandas that referenced this issue Apr 20, 2017
… per pandas-dev#15520

This change ensures that no error is raised when type 'object' is passed.
analyticalmonk pushed a commit to analyticalmonk/pandas that referenced this issue Apr 20, 2017
… per pandas-dev#15520

This change ensures that no error is raised when type 'object' is passed.
analyticalmonk pushed a commit to analyticalmonk/pandas that referenced this issue Apr 21, 2017
@jreback jreback modified the milestones: 0.20.0, Next Major Release Apr 24, 2017
analyticalmonk added a commit to analyticalmonk/pandas that referenced this issue Apr 24, 2017
pcluo pushed a commit to pcluo/pandas that referenced this issue May 22, 2017
closes pandas-dev#15520

Author: Akash Tandon <akashtndn.acm@gmail.com>
Author: root <akashtndn.acm@gmail.com>
Author: analyticalmonk <akash@redcarpetup.com>
Author: Akash Tandon <analyticalmonk@users.noreply.github.com>

Closes pandas-dev#16047 from analyticalmonk/patch_for_15520 and squashes the following commits:

3646eb6 [analyticalmonk] TST: check for invalid dtype for Series constructor per GH15520
73d980a [Akash Tandon] Merge branch 'master' into patch_for_15520
b3c2fbb [root] BUG: Added 'O' to pandas_dtype's valid list
c3699fb [root] DOC: added whatsnew entry for PR#16047 addressing GH15520
fbed5a6 [Akash Tandon] TST: Added list to invalid dtype
ad9f345 [Akash Tandon] CLN: refactored code related to issue GH15520
a358181 [Akash Tandon] BUG: Added numpy.dtype_ to valid pandas_dtype() type list
3eaa432 [Akash Tandon] TST: Added numpy.object_ dtype to valid pandas_dtype list
f858726 [Akash Tandon] style fix
d4971cd [Akash Tandon] BUG: pandas_dtype() to raise error for invalid dtype per GH15520
ee0030f [Akash Tandon] TST: added more test-cases for pandas_dtype() test
3700259 [Akash Tandon] CLN: Replace _coerce_to_dtype() with pandas_dtype()
c10e1d4 [Akash Tandon] TST: maintain list containing dtypes in TestPandasDtype
fecba12 [Akash Tandon] BUG: Raise when invalid dtype passed to pandas_dtype
99fb660 [Akash Tandon] TST: wrote test representing bug fix result for pandas-dev#15520
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 Error Reporting Incorrect or improved errors from pandas
Projects
None yet
3 participants