Skip to content

Commit f6ca3e3

Browse files
author
y-p
committed
TST: df.ix[:,unicode] should not die with UnicodeEncodeError
1 parent 83c377e commit f6ca3e3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

pandas/tests/test_internals.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -408,6 +408,13 @@ def test_get_numeric_data(self):
408408

409409
self.assertEqual(rs.ix[0, 'bool'], not df.ix[0, 'bool'])
410410

411+
def test_missing_unicode_key(self):
412+
df=DataFrame({"a":[1]})
413+
try:
414+
df.ix[:,u"\u05d0"] # should not raise UnicodeEncodeError
415+
except KeyError:
416+
pass # this is the expected exception
417+
411418
if __name__ == '__main__':
412419
# unittest.main()
413420
import nose

0 commit comments

Comments
 (0)