MCPcopy
hub / github.com/pandas-dev/pandas / test_strftime

Method test_strftime

pandas/tests/arrays/test_datetimelike.py:906–913  ·  view source on GitHub ↗
(self, arr1d, using_infer_string)

Source from the content-addressed store, hash-verified

904 tm.assert_datetime_array_equal(result, expected)
905
906 def test_strftime(self, arr1d, using_infer_string):
907 arr = arr1d
908
909 result = arr.strftime("%Y %b")
910 expected = np.array([ts.strftime("%Y %b") for ts in arr], dtype=object)
911 if using_infer_string:
912 expected = pd.array(expected, dtype=pd.StringDtype(na_value=np.nan))
913 tm.assert_equal(result, expected)
914
915 def test_strftime_nat(self, using_infer_string):
916 # GH 29578

Callers

nothing calls this directly

Calls 2

strftimeMethod · 0.45
arrayMethod · 0.45

Tested by

no test coverage detected