We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
numfocus
Learn more about funding links in repositories.
Report abuse
There was an error while loading. Please reload this page.
1 parent 003c6ac commit e46bc00Copy full SHA for e46bc00
pandas/tests/frame/test_axis_select_reindex.py
@@ -884,6 +884,27 @@ def test_filter_regex_search(self):
884
exp = df[[x for x in df.columns if 'BB' in x]]
885
assert_frame_equal(result, exp)
886
887
+ @pytest.mark.parametrize('name,expected',[
888
+ ('a', DataFrame({u'a': [1, 2]})),
889
+ (u'a', DataFrame({u'a': [1, 2]})),
890
+ (u'あ', DataFrame({u'あ': [3, 4]}))
891
+ ])
892
+ def test_filter_unicode(self, name, expected):
893
+ # GH13101
894
+ df = DataFrame({u'a': [1, 2], u'あ': [3, 4]})
895
+
896
+ assert_frame_equal(df.filter(like=name), expected)
897
+ assert_frame_equal(df.filter(regex=name), expected)
898
899
+ @pytest.mark.parametrize('name', ['a', u'a'])
900
+ def test_filter_bytestring(self, name):
901
902
+ df = DataFrame({b'a': [1, 2], b'b': [3, 4]})
903
+ expected = DataFrame({b'a': [1, 2]})
904
905
906
907
908
def test_filter_corner(self):
909
empty = DataFrame()
910
0 commit comments