(self)
| 812 | return self.read_csv(pa.py_buffer(b), **kwargs) |
| 813 | |
| 814 | def test_file_object(self): |
| 815 | data = b"a,b\n1,2\n" |
| 816 | expected_data = {'a': [1], 'b': [2]} |
| 817 | bio = io.BytesIO(data) |
| 818 | table = self.read_csv(bio) |
| 819 | assert table.to_pydict() == expected_data |
| 820 | # Text files not allowed |
| 821 | sio = io.StringIO(data.decode()) |
| 822 | with pytest.raises(TypeError): |
| 823 | self.read_csv(sio) |
| 824 | |
| 825 | def test_header(self): |
| 826 | rows = b"abc,def,gh\n" |