据Gran称,该公司没有将所有生产转移到俄罗斯的计划,尽管俄罗斯是该公司发展的地方@中性
以上是文本,我想用@将其分开,这样它将产生两列
data = pd.read_csv(r'F:Sentences_50Agree.csv', sep='@', header=None)
我试过上面的,但没有用。它只显示了一列包含@neutral 在内的全部文本
import pandas as pd
from io import StringIO
s = 'According to Gran, the company has no plans to move all production to Russia, although that is where the company is growing .@neutral'
print( pd.read_csv(StringIO(s), sep='@', header=None) )
打印:
0 1
0 According to Gran, the company has no plans to... neutral
或带有文件:
print( pd.read_csv('file.txt', sep='@', header=None) )