程序问答   发布时间:2022-06-01  发布网站:大佬教程  code.js-code.com
大佬教程收集整理的这篇文章主要介绍了我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。

如何解决我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号?

开发过程中遇到我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号的问题如何解决?下面主要结合日常开发的经验,给出你关于我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号的解决方法建议,希望对你解决我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号有所启发或帮助;

@H_605_3@mKT['Income'] = MKT['Income'].str.replace('$','')

我收到此错误 [在此处输入图片说明][1]

~\anaconda3\lib\site-packages\pandas\core\indexes\base.py in get_loc(self,key,method,tolerancE)
   2894             try:
-> 2895                 return self._ENGIne.get_loc(casted_key)
   2896             except KeyError as err:

pandas\_libs\index.pyx in pandas._libs.index.IndexENGIne.get_loc()

pandas\_libs\index.pyx in pandas._libs.index.IndexENGIne.get_loc()

pandas\_libs\hashtable_class_Helper.pxi in pandas._libs.hashtable.PyObjectHashtable.get_item()

pandas\_libs\hashtable_class_Helper.pxi in pandas._libs.hashtable.PyObjectHashtable.get_item()

KeyError: 'Income'

The above exception was the direct cause of the following exception:

KeyError                                  TraceBACk (most recent call last)
<ipython-input-22-5ea6ddc03a8c> in <module>
----> 1 MKT['Income'] = MKT['Income'].str.replace('$','')

~\anaconda3\lib\site-packages\pandas\core\frame.py in __getitem__(self,key)
   2900             if self.columns.nlevels > 1:
   2901                 return self._getitem_multilevel(key)
-> 2902             indexer = self.columns.get_loc(key)
   2903             if is_Integer(indexer):
   2904                 indexer = [indexer]

~\anaconda3\lib\site-packages\pandas\core\indexes\base.py in get_loc(self,tolerancE)
   2895                 return self._ENGIne.get_loc(casted_key)
   2896             except KeyError as err:
-> 2897                 raise KeyError(key) from err
   2898 
   2899         if tolerance is not None:

KeyError: 'Income'
 


  [1]: https://i.stack.imgur.com/5WszY.png

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

大佬总结

以上是大佬教程为你收集整理的我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号全部内容,希望文章能够帮你解决我是 jupyter 的新手,不明白这个错误,我想删除 $ 符号所遇到的程序开发问题。

如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。

本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。