我使用jupyter notebook with pandas,我想在一个大文件中找到我选择的一个重复出现的单词,然后选择行并将其粘贴或附加到另一个文本文件中,例如使用单词“
测验
".:
this is a test sample line
this is a second example line
this is a third example line
this is a test fourth sample line
this is a final example line
然后在一个新的文本文件中,只显示
测验
“目前:
this is a test sample line
this is a test fourth sample line
我如何在python中使用jupyter实现这一点以使事情变得更简单?
另外,如果你能从多个文本文件中读取并附加行而不覆盖它们,那将是完美的!
一如既往地谢谢你!