@@ -22,39 +22,30 @@ def test_unique(series_with_client):
2222 wait (result , client , 10 * 60 )
2323
2424
25- # def test_contains(small_client):
26- # """String contains"""
27- # memory = cluster_memory(small_client)
28- # df = timeseries_of_size(memory)
29- # s = df.name.astype(pd.StringDtype("pyarrow")).persist()
30- # result = s.str.contains("a")
31- # wait(result, small_client, 10 * 60)
32- #
33- #
34- # def test_startswith(small_client):
35- # """String starts with"""
36- # memory = cluster_memory(small_client)
37- # df = timeseries_of_size(memory)
38- # s = df.name.astype(pd.StringDtype("pyarrow")).persist()
39- # result = s.str.startswith("B")
40- # wait(result, small_client, 10 * 60)
41- #
42- #
43- # def test_filter(small_client):
44- # """How fast can we filter a DataFrame?"""
45- # memory = cluster_memory(small_client)
46- # df = timeseries_of_size(memory)
47- # df.name = df.name.astype(pd.StringDtype("pyarrow"))
48- # df = df.persist()
49- # name = df.head(1).name.iloc[0] # Get first name that appears
50- # result = df[df.name == name]
51- # wait(result, small_client, 10 * 60)
52- #
53- #
54- # def test_value_counts(small_client):
55- # """Value counts on string values"""
56- # memory = cluster_memory(small_client)
57- # df = timeseries_of_size(memory)
58- # s = df.name.astype(pd.StringDtype("pyarrow")).persist()
59- # result = s.value_counts()
60- # wait(result, small_client, 10 * 60)
25+ def test_contains (series_with_client ):
26+ """String contains"""
27+ series , client = series_with_client
28+ result = series .str .contains ("a" )
29+ wait (result , client , 10 * 60 )
30+
31+
32+ def test_startswith (series_with_client ):
33+ """String starts with"""
34+ series , client = series_with_client
35+ result = series .str .startswith ("B" )
36+ wait (result , client , 10 * 60 )
37+
38+
39+ def test_filter (series_with_client ):
40+ """How fast can we filter the Series"""
41+ series , client = series_with_client
42+ name = series .iloc [0 ] # Get first name that appears
43+ result = series [series == name ]
44+ wait (result , client , 10 * 60 )
45+
46+
47+ def test_value_counts (series_with_client ):
48+ """Value counts on string values"""
49+ series , client = series_with_client
50+ result = series .value_counts ()
51+ wait (result , client , 10 * 60 )
0 commit comments