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

Function test_findall_mixed_object

pandas/tests/strings/test_find_replace.py:1479–1509  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1477
1478
1479def test_findall_mixed_object():
1480 ser = Series(
1481 [
1482 "fooBAD__barBAD",
1483 np.nan,
1484 "foo",
1485 True,
1486 datetime.today(),
1487 "BAD",
1488 None,
1489 1,
1490 2.0,
1491 ]
1492 )
1493
1494 result = ser.str.findall("BAD[_]*")
1495 expected = Series(
1496 [
1497 ["BAD__", "BAD"],
1498 np.nan,
1499 [],
1500 np.nan,
1501 np.nan,
1502 ["BAD"],
1503 None,
1504 np.nan,
1505 np.nan,
1506 ]
1507 )
1508
1509 tm.assert_series_equal(result, expected)
1510
1511
1512@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

SeriesClass · 0.90
findallMethod · 0.80

Tested by

no test coverage detected