This is a self-answered post. Below I outline a common problem in the NLP domain and propose a few performant methods to solve it.
Oftentimes the need arises to remo
Interesting enough that vectorized Series.str.translate method is still slightly slower compared to Vanilla Python str.translate():
str.translate()
def pd_translate(df): return df.assign(text=df['text'].str.translate(transtab))