【发布时间】:2021-03-07 18:13:10
【问题描述】:
我在使用 geopanda 的 read_file() 读取 geojson 时收到以下警告:
...geodataframe.py:422: RuntimeWarning: Sequential read of iterator was interrupted. Resetting iterator. This can negatively impact the performance.
for feature in features_lst:
这是我使用的代码示例:
crime_gdf = gpd.read_file('datasets/crimes.geojson', bbox=bbox)
crimes.geojson 是一个包含大量点的文件,每个点都有一个“犯罪类型”
bbox 定义边界
代码按预期运行,但我不明白那个警告。
编辑
我将 geojson 转换为羽毛,我得到了同样的警告。
【问题讨论】:
-
您确定没有其他内容正在写入或以其他方式使用该文件吗?
-
是的,文件只被这个脚本使用
-
它在 Google Drive 文件夹中。会是这个原因吗?
-
我不知道,你可以把它移出 Google Drive 看看是否有帮助
-
它在 Google Drive 文件夹外运行时出现同样的警告