-
-
Notifications
You must be signed in to change notification settings - Fork 18k
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: fix to_records confict with unicode_literals #13172 #13178
Conversation
pls add the test from the issue & a whats new (bug fix) |
def test_to_records_with_unicode_index(self): | ||
res = DataFrame([{u'a': u'x', u'b': 'y'}]).set_index(u'a').to_records() | ||
expect_res = np.rec.array([('x', 'y')], dtype=[('a', 'O'), ('b', 'O')]) | ||
self.assertEqual(res, expect_res) |
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.
use
result = ....
expected = ....
tm.assert_numpy_array_equal(result, expected)
use tm.assert_numpy_array_equal
here (and only need 1 assert; that will compare everything)
add the issue number as a comment
lgtm. minor test change; ping when green. |
done. lgtm. minor test change; ping when green. |
thanks @starplanet nice patch! |
git diff upstream/master | flake8 --diff