Why is this apply() custom function is slower in Polars than in Pandas
Why is this apply() custom function is slower in Polars than in Pandas Question: I ran the following in a Jupyter Notebook and was disappointed that similar Pandas code is faster. Hoping someone can show a smarter approach in Polars. POLARS VERSION def cleanse_text(sentence): RIGHT_QUOTE = r"(u2019)" sentence = re.sub(RIGHT_QUOTE, "’", sentence) sentence = re.sub(r" …