Coerce an array of datetime-like values to a pandas Series and apply string formatting
(values, date_format: str)
| 210 | |
| 211 | |
| 212 | def _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 | |
| 221 | def _strftime(values, date_format): |