I am trying to apply a function cleantext to each row of a dataframe column. It works perfect without apply function and I get the result which I want. Here is the problem
import cleantext
from cleantext import clean
master_df_m['col'] = master_df_m.Presentation.apply(lambda row: clean(row))
CleanTextEmptyString: No text is provided to clean
Here is no problem:
print(clean(master_df_m.Presentation[0], clean_all=True))
Output:
oper good morn name janeka confer oper time would like welcom everyon comerica second quarter earn call line place mute prevent background nois speaker remark questionandansw session oper instruct thank would like turn call ms darlen person director investor relat may begin darlen person comerica incorpor director ir thank janeka good morn welcom comerica
What is the matter? I also tried to put axis=1 in the brackets for apply function.