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

Function test_casemethods

pandas/tests/strings/test_case_justify.py:111–118  ·  view source on GitHub ↗
(any_string_dtype)

Source from the content-addressed store, hash-verified

109
110
111def test_casemethods(any_string_dtype):
112 values = ["aaa", "bbb", "CCC", "Dddd", "eEEE"]
113 s = Series(values, dtype=any_string_dtype)
114 assert s.str.lower().tolist() == [v.lower() for v in values]
115 assert s.str.upper().tolist() == [v.upper() for v in values]
116 assert s.str.title().tolist() == [v.title() for v in values]
117 assert s.str.capitalize().tolist() == [v.capitalize() for v in values]
118 assert s.str.swapcase().tolist() == [v.swapcase() for v in values]
119
120
121def test_pad(any_string_dtype):

Callers

nothing calls this directly

Calls 7

SeriesClass · 0.90
lowerMethod · 0.80
upperMethod · 0.80
titleMethod · 0.80
capitalizeMethod · 0.80
swapcaseMethod · 0.80
tolistMethod · 0.45

Tested by

no test coverage detected