We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e4b636 commit 33e44d8Copy full SHA for 33e44d8
1 file changed
docs/hub/datasets-dask.md
@@ -71,6 +71,13 @@ def dummy_count_words(texts):
71
return pd.Series([len(text.split(" ")) for text in texts])
72
```
73
74
+or a similar function using pandas string methods (faster):
75
+
76
+```python
77
+def dummy_count_words(texts):
78
+ return texts.str.count(" ")
79
+```
80
81
In pandas you can use this function on a text column:
82
83
```python
0 commit comments