当前位置:   article > 正文

记一名算法工程师在工作中遇到的各种坑(不定时更新)_自动驾驶算法工程师踩过的坑

自动驾驶算法工程师踩过的坑

在工作中总会遇到各种各样的bug,有时不清楚出错状况就会花费很久的时间。故想将工作中遇到的问题一一列举出来,以防下次仍遇到相同的问题。

1.在pycharm中debug出现以下问题:AttributeError: module ‘matplotlib’ has no attribute ‘verbose’

settings->Tools->Python Scientific->Show plots in toolwindow将√去除
在这里插入图片描述

2.pycharm工具里在展示DataFrame数据时,无法在右侧固定显示。

如下图所示:
在这里插入图片描述

勾选View -> scientific Mode在这里插入图片描述
在这里插入图片描述

3. 如何去掉matplotlib在SciView出现

File -> Settings -> Tools -> python scientific ->Show plots in toolwindow(去掉勾选)
在这里插入图片描述
结果:
在这里插入图片描述

4. python程序不停止,出现PyDev console: starting.

解决方案:

点开有个 Edit configuration…
或者在Run->Edit configuration…
选择要更改的.py文件的configuration -> show command line afterwards
在这里插入图片描述
在这里插入图片描述

5. Pascal VOC数据集下载网址

一直在找Pascal voc数据集下载地址,但官网好像上不去,记录一下镜像网址

Pascal Voc 2007 和Voc 2012下载地址:
https://pjreddie.com/projects/pascal-voc-dataset-mirror/

官网:
http://host.robots.ox.ac.uk/pascal/VOC/

6.ModuleNotFoundError: No module named ‘_tkinter’

解决方案:matplotlib的版本太低了,改为pip3 install MatPlotLib==3.1.1

7.解决sql语句报黄的问题

在这里插入图片描述

8.zip解压缩中文文件名乱码

解决方法:加 -O cp936参数
如:unzip -O cp936 eat_pyspark_in_10_days.zip

后续,不定期更新中~~~

注:博客园该文章已断更,后续在此文章中继续更新。

9. DataFrame坑

dataframe赋值和新增列,对应的ID都不会变,如果是广播运算,ID就会变。

import pandas as pd


df = pd.DataFrame([[1, 11], [2, 22]], columns=['index', 'height'])
print(id(df))
df['index'] = df['index'] + 1
print(id(df))

df['other'] = 2
print(id(df))

df = df + 10
print(id(df))
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Li_阴宅/article/detail/753604
推荐阅读
相关标签
  

闽ICP备14008679号