Subscribe
提醒
guest

2 评论
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
PY GISER31
3 年 之前

s = s_data.loc[s_data[‘geometry‘].contains(row),[‘name‘]].values这个里面的用[‘name’]的时候,会报下面的错误:
Exception has occurred: ValueError

Invalid field type <class ‘numpy.ndarray’>
File “D:\CODE\geopandas\main.py”, line 23, in <module>
bwg_data.to_file(‘bwg_new1.geojson’,driver=”GeoJSON”,encoding=’utf-8′)

但是,当s = s_data.loc[s_data[‘geometry‘].contains(row),’name‘].values,这个里面name没有方括号,就运行正常。其他的地方都是一样的。
我调试了也能出来s的值正常,但就是最后一步to_file报错呢。

2
0
交流思想,留下评论.x