【发布时间】:2020-08-05 00:06:31
【问题描述】:
我有一个 geoDataFrame,其结构如下:
<class 'geopandas.geodataframe.GeoDataFrame'>
RangeIndex: 28 entries, 0 to 27
Data columns (total 3 columns):
# Column Non-Null Count Dtype
--- ------ -------------- -----
0 Name 28 non-null object
1 Description 28 non-null object
2 geometry 28 non-null geometry
dtypes: geometry(1), object(2)
memory usage: 800.0+ bytes
我正在尝试使用 gdf.to_sql 将其保存在 MySQL 数据库中,并且我的连接使用的是 SQLAlchemy 但我收到以下错误:AttributeError: 'GeometryDtype' 对象没有属性 'base'。
我一直在环顾四周,发现了这个solution,但我找不到正确的语法使其适用于 MySQL。
【问题讨论】:
标签: python mysql gis geopandas