Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
3.0.0
-
None
Description
when importing csv data with dates in the format "%d-%b-%y" or "%d-%b-%Y" an error is given in conversion:
example:
import pyarrow as pa from pyarrow import csv data = b"a,b\n1,15-OCT-15\n2,18-JUN-90\n" tp = ["%d-%b-%y"] try: schema_d64 = pa.schema([pa.field("a", pa.int64()), pa.field("b", pa.date64())]) co_d64 = csv.ConvertOptions(timestamp_parsers=tp, column_types=schema_d64) a_d64 = csv.read_csv(pa.py_buffer(data), convert_options=co_d64) except Exception as e: print(e) try: schema_d32 = pa.schema([pa.field("a", pa.int64()), pa.field("b", pa.date32())]) co_d32 = csv.ConvertOptions(timestamp_parsers=tp, column_types=schema_d32) a_d32 = csv.read_csv(pa.py_buffer(data), convert_options=co_d32) except Exception as e: print(e)
Attachments
Issue Links
- is related to
-
ARROW-11243 [C++] Parse time32 from string and infer in CSV reader
- Resolved