Yin*_*Gao 1 python dataframe pandas
我有一个DataFrame,每一行都有一个句子。但是句子的长度不一样。我想选择包含10个以上单词的行,例如
df = df.loc[len(df[src].str.split()) > 10]
Run Code Online (Sandbox Code Playgroud)
但这会引起密钥为真的错误。怎么做?
| 归档时间: |
|
| 查看次数: |
44 次 |
| 最近记录: |