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