AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas(

Posted nunca

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas(相关的知识,希望对你有一定的参考价值。

test_behavior_A["var3"]=test_behavior_A["var3"].str.strip("M").astype("float")

  上述代码改为:

test_behavior_A["var3"]=test_behavior_A["var3"].astype(str).strip("M").astype("float")

  

以上是关于AttributeError: Can only use .str accessor with string values, which use np.object_ dtype in pandas(的主要内容,如果未能解决你的问题,请参考以下文章

only god can judge me 歌词

RabbitMQ首次安装登陆User can only log in via localhost

Unpickling 保存的 pytorch 模型会引发 AttributeError: Can't get attribute 'Net' on <module '__main__' 尽管内联

AttributeError: Can‘t pickle local object ‘Stage.__init__.<locals>.<lambda>‘

AttributeError: Can‘t pickle local object ‘Stage.__init__.<locals>.<lambda>‘

Error: Finish can only be called once