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

Function test_rsplit_max_number

pandas/tests/strings/test_split_partition.py:133–139  ·  view source on GitHub ↗
(any_string_dtype)

Source from the content-addressed store, hash-verified

131
132
133def test_rsplit_max_number(any_string_dtype):
134 # setting max number of splits, make sure it's from reverse
135 values = Series(["a_b_c", "c_d_e", np.nan, "f_g_h"], dtype=any_string_dtype)
136 result = values.str.rsplit("_", n=1)
137 exp = Series([["a_b", "c"], ["c_d", "e"], np.nan, ["f_g", "h"]])
138 exp = _convert_na_value(values, exp)
139 tm.assert_series_equal(result, exp)
140
141
142def test_split_blank_string(any_string_dtype):

Callers

nothing calls this directly

Calls 3

SeriesClass · 0.90
_convert_na_valueFunction · 0.90
rsplitMethod · 0.80

Tested by

no test coverage detected