首页 > 编程语言 > 详细

Python-Matplotlib2 Questions

时间:2017-02-16 13:39:24      阅读:301      评论:0      收藏:0      [点我收藏+]

Question 1:

列中有中文

Traceback (most recent call last):
File "~/PycharmProjects/ltest/scripts/py_matlab.py", line 17, in <module>
ages, weights, heights = np.loadtxt(‘data.csv‘, delimiter=‘,‘ , skiprows=0 , unpack=True)
File "/opt/share/anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py", line 888, in loadtxt
first_vals = split_line(first_line)
File "/opt/share/anaconda3/lib/python3.6/site-packages/numpy/lib/npyio.py", line 864, in split_line
line = asbytes(line)
File "/opt/share/anaconda3/lib/python3.6/site-packages/numpy/compat/py3k.py", line 31, in asbytes
return str(s).encode(‘latin1‘)
UnicodeEncodeError: ‘latin-1‘ codec can‘t encode characters in position 0-1: ordinal not in range(256)

Resolve 1 :

http://blog.csdn.net/dgatiger/article/details/50414549

Python-Matplotlib2 Questions

原文:http://www.cnblogs.com/zsr0401/p/6404912.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!