MCPcopy Index your code
hub / github.com/pydata/xarray / _strftime_through_series

Function _strftime_through_series

xarray/core/accessor_dt.py:212–218  ·  view source on GitHub ↗

Coerce an array of datetime-like values to a pandas Series and apply string formatting

(values, date_format: str)

Source from the content-addressed store, hash-verified

210
211
212def _strftime_through_series(values, date_format: str):
213 """Coerce an array of datetime-like values to a pandas Series and
214 apply string formatting
215 """
216 values_as_series = pd.Series(duck_array_ops.ravel(values), copy=False)
217 strs = values_as_series.dt.strftime(date_format)
218 return strs.to_numpy().reshape(values.shape)
219
220
221def _strftime(values, date_format):

Callers

nothing calls this directly

Calls 2

strftimeMethod · 0.45
to_numpyMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…