texthero.preprocessing.replace_stopwords¶
- 
replace_stopwords(input: pandas.core.series.Series, symbol: str, stopwords: Union[Set[str], NoneType] = None) → pandas.core.series.Series¶
- Replace all instances of words with symbol. - By default uses NLTK’s english stopwords of 179 words. - Parameters
- inputPandas Series
- symbol: str
- Character(s) to replace words with. 
- stopwordsSet[str], Optional
- Set of stopwords string to remove. If not passed, by default it used NLTK English stopwords. 
 
 - Examples - >>> s = pd.Series("the book of the jungle") >>> replace_stopwords(s, "X") 0 X book X X jungle dtype: object