Skip to content

v0.4.0

Choose a tag to compare

@github-actions github-actions released this 29 Oct 21:08
· 11 commits to main since this release

A column in one call, from C and from Python. Every input parses to what it
did in 0.3.3.

Added

  • dateparsa_parse_column: every value in a buffer, each ending at a
    separator byte, parsed down one parser in one call, into an array of the
    new dateparsa_value (the time, Unix seconds, kind, whether it was a
    guess, and a status saying why a value did not parse). It allocates
    nothing; every array is the caller's. For a language where a call into C
    costs more than a parse does.
  • dateparsa.parse_column(values, **options) in Python, on top of it: one
    call into the library for the whole column, with None read as a value
    that does not parse. Down 10,000 RFC 3339 values on Python 3.13
    (docs/PERF.md) it takes 169 ns a value to datetimes, where a Parser
    called once a value takes 1.12 µs, and 32.9 ns into numpy, where pandas
    working out the format takes 78.2. What it returns gives datetimes(),
    times(), failed and ambiguous, and datetime64() for a numpy array
    pandas takes, NaT where a value did not parse; numpy is not a
    dependency.
  • A fuzz target: the column call, on any bytes split at any separator,
    answers for each value what a Parser answers parsing them in turn.