when importing csv data with dates in the format "%d-%b-%y" or "%d-%b-%Y" an error is given in conversion:
example:
importpyarrowaspafrompyarrowimportcsvdata=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)
exceptExceptionase:
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)
exceptExceptionase:
print(e)Reporter: Stephen Bias
Related issues:
Note: This issue was originally created as ARROW-12539. Please see the migration documentation for further details.
when importing csv data with dates in the format
"%d-%b-%y"or"%d-%b-%Y"an error is given in conversion:example:
Reporter: Stephen Bias
Related issues:
Note: This issue was originally created as ARROW-12539. Please see the migration documentation for further details.