-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: cast to correct dtype in Index.drop() #18309
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #18309 +/- ##
==========================================
- Coverage 91.39% 91.38% -0.02%
==========================================
Files 164 164
Lines 49854 49855 +1
==========================================
- Hits 45566 45558 -8
- Misses 4288 4297 +9
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18309 +/- ##
==========================================
+ Coverage 91.6% 91.61% +<.01%
==========================================
Files 150 150
Lines 48939 48940 +1
==========================================
+ Hits 44833 44834 +1
Misses 4106 4106
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add the test from the original issue. (crosstab), lgtm. otherwise.
@@ -404,7 +404,7 @@ def _asarray_tuplesafe(values, dtype=None): | |||
return result | |||
|
|||
|
|||
def _index_labels_to_array(labels): | |||
def _index_labels_to_array(labels, dtype=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc-string here would be nice; in theory some unit tests if you can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
docstring added; this is tested in my new test and, in old tests, whenever Index(dtype='object').drop()
is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am asking for some unit-tests for this routine itself. all of these helper routines should ideally have tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Uhm... unless there are specific coverage (lines of code) issues, I personally don't see this as an efficient use of my time, considering how many and how frequently changed are pandas internal routines.
d7f9c60
to
3f67f31
Compare
@@ -404,7 +404,7 @@ def _asarray_tuplesafe(values, dtype=None): | |||
return result | |||
|
|||
|
|||
def _index_labels_to_array(labels): | |||
def _index_labels_to_array(labels, dtype=None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am asking for some unit-tests for this routine itself. all of these helper routines should ideally have tests.
can you rebase |
3f67f31
to
7fea97a
Compare
thanks @toobaz |
git diff upstream/master -u -- "*.py" | flake8 --diff