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

Method test_options_delimiter

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

Source from the content-addressed store, hash-verified

1502 self.read_bytes(rows)
1503
1504 def test_options_delimiter(self):
1505 rows = b"a;b,c\nde,fg;eh\n"
1506 table = self.read_bytes(rows)
1507 assert table.to_pydict() == {
1508 'a;b': ['de'],
1509 'c': ['fg;eh'],
1510 }
1511 opts = ParseOptions(delimiter=';')
1512 table = self.read_bytes(rows, parse_options=opts)
1513 assert table.to_pydict() == {
1514 'a': ['de,fg'],
1515 'b,c': ['eh'],
1516 }
1517
1518 def test_small_random_csv(self):
1519 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