You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: doc/source/whatsnew/v0.17.0.txt
+24
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,7 @@ Highlights include:
18
18
previously this would return the original input, see :ref:`here <whatsnew_0170.api_breaking.to_datetime>`
19
19
- The default for ``dropna`` in ``HDFStore`` has changed to ``False``, to store by default all rows even
20
20
if they are all ``NaN``, see :ref:`here <whatsnew_0170.api_breaking.hdf_dropna>`
21
+
- Support for ``Series.dt.strftime`` to generate formatted strings for datetime-likes, see :ref:`here <whatsnew_0170.strftime>`
21
22
- Development installed versions of pandas will now have ``PEP440`` compliant version strings (:issue:`9518`)
22
23
23
24
Check the :ref:`API Changes <whatsnew_0170.api>` and :ref:`deprecations <whatsnew_0170.deprecations>` before updating.
@@ -60,6 +61,29 @@ Releasing of the GIL could benefit an application that uses threads for user int
60
61
.. _dask: https://dask.readthedocs.org/en/latest/
61
62
.. _QT: https://wiki.python.org/moin/PyQt
62
63
64
+
.. _whatsnew_0170.strftime:
65
+
66
+
Support strftime for Datetimelikes
67
+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68
+
69
+
We are now supporting a ``Series.dt.strftime`` method for datetime-likes to generate a formatted string (:issue:`10110`). Examples:
70
+
71
+
.. ipython:: python
72
+
73
+
# DatetimeIndex
74
+
s = pd.Series(pd.date_range('20130101', periods=4))
75
+
s
76
+
s.dt.strftime('%Y/%m/%d')
77
+
78
+
.. ipython:: python
79
+
80
+
# PeriodIndex
81
+
s = pd.Series(pd.period_range('20130101', periods=4))
82
+
s
83
+
s.dt.strftime('%Y/%m/%d')
84
+
85
+
The string format is as the python standard library and details can be found `here <https://docs.python.org/2/library/datetime.html#strftime-and-strptime-behavior>`_
0 commit comments