pyarrow.compute.strftime

pyarrow.compute.strftime(timestamps, *, memory_pool=None, options=None, format='%Y-%m-%dT%H:%M:%S', locale='C')

Format temporal values according to a format string.

For each input value, emit a formatted string. The time format string and locale can be set using StrftimeOptions. The output precision of the “%S” (seconds) format code depends on the input time precision: it is an integer for timestamps with second precision, a real number with the required number of fractional digits for higher precisions. Null values emit null. An error is returned if the values have a defined timezone but it cannot be found in the timezone database, or if the specified locale does not exist on this system.

Parameters
  • timestamps (Array-like or scalar-like) – Argument to compute function

  • memory_pool (pyarrow.MemoryPool, optional) – If not passed, will allocate memory from the default memory pool.

  • options (pyarrow.compute.StrftimeOptions, optional) – Parameters altering compute function semantics.

  • format (optional) – Parameter for StrftimeOptions constructor. Either options or format can be passed, but not both at the same time.

  • locale (optional) – Parameter for StrftimeOptions constructor. Either options or locale can be passed, but not both at the same time.