(self)
| 797 | return self.read_csv(pa.py_buffer(b), **kwargs) |
| 798 | |
| 799 | def test_file_object(self): |
| 800 | data = b"a,b\n1,2\n" |
| 801 | expected_data = {'a': [1], 'b': [2]} |
| 802 | bio = io.BytesIO(data) |
| 803 | table = self.read_csv(bio) |
| 804 | assert table.to_pydict() == expected_data |
| 805 | # Text files not allowed |
| 806 | sio = io.StringIO(data.decode()) |
| 807 | with pytest.raises(TypeError): |
| 808 | self.read_csv(sio) |
| 809 | |
| 810 | def test_header(self): |
| 811 | rows = b"abc,def,gh\n" |