Numpy运行报错
1,VisibleDeprecationWarning: Reading unicode strings without specifying the encoding argument is deprecated. Set the encoding, use None for the system default.
#iris数据集分析
url='https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data'
iris=np.genfromtxt(fname=url,delimiter=',',dtype=None)
names = ('sepallength', 'sepalwidth', 'petallength', 'petalwidth', 'species')
print("dtype=object的返回结果样式:\n",iris[:4])
dtype=None,运行会报如下错误警告

浙公网安备 33010602011771号