[英].str.lower() returns null values
In order to convert the strings to lowercase in token_text2['text'], I'm applying .str.lower() as follows:为了将 token_text2['text'] 中的字符串转换为小写,我应用 .str.lower() 如下:
token_text2['text'] = token_text2['text'].str.lower()
But the dataframe returns with null values.但是数据帧返回空值。 What am I doing wrong here?
我在这里做错了什么?
Answer: I had a dataframe with text that was tokenised.答:我有一个带有标记化文本的数据框。 I did str.lower() before tokenising and this has turned all of my text into lowercase successfully.
我在标记之前做了 str.lower() ,这已经成功地将我的所有文本都变成了小写。
Thank you everyone for your input.谢谢大家的意见。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.