Skip to content

[BUG] Validate dtype when Int64Index, UInt64Index, or Float64Index are cons… #29545

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 9 commits into from
Nov 18, 2019

Conversation

MarcoGorelli
Copy link
Member

@MarcoGorelli MarcoGorelli commented Nov 11, 2019

…tructed

Copy link
Member

@jschendel jschendel left a comment

Choose a reason for hiding this comment

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

Thanks! Can you add an entry to the 1.0 whatsnew under the "Bug Fixes - Numeric" subsection?

@jschendel jschendel added this to the 1.0 milestone Nov 11, 2019
@jschendel jschendel added Constructors Series/DataFrame/Index/pd.array Constructors Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas labels Nov 11, 2019
…dtype to be passed to float64index, match valueerror message
@MarcoGorelli
Copy link
Member Author

MarcoGorelli commented Nov 11, 2019

Done, but I don't think it's right yet, need to understand what goes on in test_coercion (shouldn't be necessary to allow Float64 index with integer dtype?)

UPDATE: fixed

…ad remove dtype from call to Float64Index in the constructor of Index
@MarcoGorelli
Copy link
Member Author

@jschendel thanks for your review :) I've updated my PR as per your suggestions

@MarcoGorelli MarcoGorelli changed the title [WIP] Validate dtype when Int64Index, UInt64Index, or Float64Index are cons… [BUG] Validate dtype when Int64Index, UInt64Index, or Float64Index are cons… Nov 12, 2019
Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

can you conform RangeIndex._validate_dtype to the same signature here

@MarcoGorelli
Copy link
Member Author

Thanks for your reviews, @jreback and @jschendel , really appreciate it. Have updated the PR accordingly.

Copy link
Member

@jschendel jschendel left a comment

Choose a reason for hiding this comment

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

lgtm overall; one small comment

@MarcoGorelli
Copy link
Member Author

@jschendel sure, done!

@jschendel
Copy link
Member

Can you merge master to resolve the conflict in the whatsnew?

@MarcoGorelli
Copy link
Member Author

Done - thanks for the approval!

@jreback jreback merged commit 17fe9a4 into pandas-dev:master Nov 18, 2019
@jreback
Copy link
Contributor

jreback commented Nov 18, 2019

thanks @MarcoGorelli

@MarcoGorelli MarcoGorelli deleted the numeric-constructors branch November 18, 2019 13:48
Reksbril pushed a commit to Reksbril/pandas that referenced this pull request Nov 18, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
proost pushed a commit to proost/pandas that referenced this pull request Dec 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Constructors Series/DataFrame/Index/pd.array Constructors Dtype Conversions Unexpected or buggy dtype conversions Error Reporting Incorrect or improved errors from pandas
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Numeric Index constructors should validate dtype parameter
3 participants