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: fix to_records confict with unicode_literals #13172 #13178

Closed
wants to merge 1 commit into from

Conversation

starplanet
Copy link
Contributor

@starplanet starplanet commented May 14, 2016

@jreback
Copy link
Contributor

jreback commented May 14, 2016

pls add the test from the issue & a whats new (bug fix)

@jreback jreback added Unicode Unicode strings 2/3 Compat Compat pandas objects compatability with Numpy or Python functions labels May 14, 2016
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)
Copy link
Contributor

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

@jreback jreback added this to the 0.18.2 milestone May 16, 2016
@jreback
Copy link
Contributor

jreback commented May 16, 2016

lgtm. minor test change; ping when green.

@starplanet
Copy link
Contributor Author

done.
原始邮件
发件人:Jeff Rebacknotifications@github.com
收件人:pydata/pandaspandas@noreply.github.com
抄送:starplanetzhangjinjie@yimian.com.cn; Authorauthor@noreply.github.com
发送时间:2016年5月16日(周一) 20:15
主题:Re: [pydata/pandas] BUG: fix to_records confict with unicode_literals#13172 (#13178)

lgtm. minor test change; ping when green.

You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub

@jreback jreback closed this in 20ea406 May 17, 2016
@jreback
Copy link
Contributor

jreback commented May 17, 2016

thanks @starplanet nice patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Unicode Unicode strings
Projects
None yet
Development

Successfully merging this pull request may close these issues.

COMPAT: unicode_literals conflict with to_records
2 participants