I have written a function
in python , but I am passing string
to a function
as a parameter
, but I have a excel file that is Dataframe which has many rows now i want to process each row of a column as a string
.How do i do that ?
I have written the following function
which takes the string as a input no wi want o pass dataframe to the function
, how do i do that?
def pre_process(utterance):
utterance = remove_name(utterance)
utterance = text_in_next_line_after_dot(utterance)
utterance = convert_num_to_words(utterance)
utterance = remove_stop_phrase(utterance)
utterance = remove_character(utterance)
utterance = remove_blank_lines(utterance)
return utterance.strip()
Dataframe looks like this
id Utterance
1 my name is cyley . I am at post91
2 after 24 hours you need to send the email
3 there interaction id is 123456
4 he is studying at masters school
I have this kind of dataframe. I want to using utterance column as a string in the above function