texthero.preprocessing.replace_urls¶
-
replace_urls
(s: pandas.core.series.Series, symbol: str) → pandas.core.series.Series¶ Replace all urls with the given symbol.
replace_urls replace any urls from the given Pandas Series with the given symbol.
See also
Examples
>>> import texthero as hero >>> import pandas as pd >>> s = pd.Series("Go to: https://example.com") >>> hero.replace_urls(s, "<URL>") 0 Go to: <URL> dtype: object