I have a pandas dataframe consisting of chat bot data and I want to print the User's input in response to a specific chat bot message eg:
(Row 1) Bot: Hi, What are your hobbies?
(Row 2) User1: Cricket, FootBall
(Row 3) Bot: Hi, What is your name?
(Row 4) User2: Alexa
(Row 5) Bot: Hi, What are your hobbies?
(Row 6) User3: Tennis, Baseball
So basically I have a dataframe with 6 rows and 1 column as above and I want to print the user's input to the specific question "Hi, What are your hobbies?" only.
I tried the following code which prints the Bot's question but I am unable to find a way to get the User's answer to that specific question.
for i in Chat_Column:
if i =="Bot: Hi, What are your hobbies?":
print (i);
Basically the output I want in this case is:
User1: Cricket, FootBall
User3: Tennis, Baseball