pandas 1.4.2

ParametersReturns
strftime(self, date_format: 'str') -> 'npt.NDArray[np.object_]'

Return an Index of formatted strings specified by date_format, which supports the same string format as the python standard library. Details of the string format can be found in python string format doc.

Parameters

date_format : str

Date format string (e.g. "%Y-%m-%d").

Returns

ndarray[object]

NumPy ndarray of formatted strings.

Convert to Index using specified date_format.

See Also

DatetimeIndex.floor

Floor the DatetimeIndex to the specified freq.

DatetimeIndex.normalize

Return DatetimeIndex with times to midnight.

DatetimeIndex.round

Round the DatetimeIndex to the specified freq.

to_datetime

Convert the given argument to datetime.

Examples

This example is valid syntax, but we were not able to check execution
>>> rng = pd.date_range(pd.Timestamp("2018-03-10 09:00"),
...  periods=3, freq='s')
... rng.strftime('%B %d, %Y, %r') Index(['March 10, 2018, 09:00:00 AM', 'March 10, 2018, 09:00:01 AM', 'March 10, 2018, 09:00:02 AM'], dtype='object')
See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /pandas/core/arrays/datetimelike.py#1547
type: <class 'function'>
Commit: