我有一个名为DataFrame
(新建筑物)的NB
,我正尝试使用以下过程将其转换为GeoPandas
:
列Coordinates
被转换为整形对象:
import pandas as pd
import geopandas
from shapely.geometry import Point
NB["Coordinates"] = NB["Coordinates"].apply(Point)
DataFrame NB
被转换为GeoPandas
,我将Coordinates
列指定为几何:
geo_df_NB = geopandas.GeoDataFrame(NB, geometry='Coordinates')
但是,出现以下错误:
AttributeError Traceback (most recent
call last)
<ipython-input-438-3adb06cd76f3> in <module>
----> 1 geo_df_NB = geopandas.GeoDataFrame(NB, geometry='Coordinates')
AttributeError: module 'geopandas' has no attribute 'GeoDataFrame'
谢谢!