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

Method test_options_delimiter

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

Source from the content-addressed store, hash-verified

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