散射熊猫dtype对象

时间:2018-04-22 01:04:58

标签: python pandas matplotlib scatter-plot data-science

我尝试使用纬度和经度数据集创建散点图。

我的代码是:

raw = pd.read_csv('locations.csv')
latitude = raw['LATITUDE'].values
longitude = raw['LONGITUDE'].values
plt.scatter(latitude, longitude)

但我得到一个TypeError:

TypeError: nan is not a string

这是因为我在数据集中有NaN值吗?

我很感激任何建议,谢谢。

enter image description here

enter image description here

0 个答案:

没有答案
相关问题