I have a small question. How can I print all the texts belonging to that author by selecting the author from the csv that I read with the pandas below, can you help with the python code? (ex. I want to display all texts where eap is author.)
Thank you!
JavaScript
x
7
1
id text author
2
id26305 This process, however, afforded me no means of EAP
3
id17569 It never once occurred to me that the fumbling HPL
4
id11008 In his left hand was a gold snuff box, from wh EAP
5
id27763 How lovely is spring As we looked from Windsor MWS
6
id12958 Finding nothing else, not even gold, the Super HPL
7
Advertisement
Answer
Hey try out using loc() to get back the series.
JavaScript
1
2
1
df.loc[df['author'] == 'EAB', 'text']
2
Also check out this Similar question