MCPcopy Create free account
hub / github.com/apache/arrow / test_options_delimiter

Method test_options_delimiter

python/pyarrow/tests/test_csv.py:1433–1445  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1431 self.read_bytes(rows)
1432
1433 def test_options_delimiter(self):
1434 rows = b"a;b,c\nde,fg;eh\n"
1435 table = self.read_bytes(rows)
1436 assert table.to_pydict() == {
1437 'a;b': ['de'],
1438 'c': ['fg;eh'],
1439 }
1440 opts = ParseOptions(delimiter=';')
1441 table = self.read_bytes(rows, parse_options=opts)
1442 assert table.to_pydict() == {
1443 'a': ['de,fg'],
1444 'b,c': ['eh'],
1445 }
1446
1447 def test_small_random_csv(self):
1448 csv, expected = make_random_csv(num_cols=2, num_rows=10)

Callers

nothing calls this directly

Calls 2

read_bytesMethod · 0.95
ParseOptionsClass · 0.90

Tested by

no test coverage detected