(self)
| 204 | } |
| 205 | |
| 206 | def test_simple_nulls(self): |
| 207 | # Infer various kinds of data, with nulls |
| 208 | rows = (b'{"a": 1, "b": 2, "c": null, "d": null, "e": null}\n' |
| 209 | b'{"a": null, "b": -5, "c": "foo", "d": null, "e": true}\n' |
| 210 | b'{"a": 4.5, "b": null, "c": "nan", "d": null,"e": false}\n') |
| 211 | table = self.read_bytes(rows) |
| 212 | schema = pa.schema([('a', pa.float64()), |
| 213 | ('b', pa.int64()), |
| 214 | ('c', pa.string()), |
| 215 | ('d', pa.null()), |
| 216 | ('e', pa.bool_())]) |
| 217 | assert table.schema == schema |
| 218 | assert table.to_pydict() == { |
| 219 | 'a': [1.0, None, 4.5], |
| 220 | 'b': [2, -5, None], |
| 221 | 'c': [None, "foo", "nan"], |
| 222 | 'd': [None, None, None], |
| 223 | 'e': [None, True, False], |
| 224 | } |
| 225 | |
| 226 | def test_empty_lists(self): |
| 227 | # ARROW-10955: Infer list(null) |
nothing calls this directly
no test coverage detected