熊猫数据框文本拆分

时间:2020-03-31 22:46:30

标签: python pandas

我有一个如下的pandas data.frame

ID.   Text
1.    Fruits grow on trees. Orange is a Citrus fruit.
2.    Root vegetables are in ground. Carrot is a root vegetable.
3.    Spinach is a leafy green. Kale is also a leafy green

我试图按如下方式组织Text

Text=['Fruits grow on trees.','Orange is a Citrus fruit.','Root vegetables are in ground.','Carrot is a root vegetable.','Spinach is a leafy green.','Kale is also a leafy green.']

我尝试过data["Text"].str.lower().to_numpy(),但这并不能将数据分成两个句子... 关于如何实现此目标的想法? 谢谢!

1 个答案:

答案 0 :(得分:1)

我们需要做go_further()

WelcomeWindow