我有一个解压缩的 shapefile 存储在 s3 存储桶中,该存储桶作为驱动器安装到 ec2 windows 虚拟机上。 s3 bucket挂载为虚拟机上的K盘。我正在尝试从 s3 存储桶中读取 shapefile 并将其作为 jupyter notebook 中的地理数据框打开。这是代码:
将 pandas 导入为 pd
将 geopandas 导入为 gpd
path = r'K:\NY TEST DATA\Counties\NY_Counties.shp'
gdf = gpd.read_file(路径)
gdf
当我运行它时,出现以下错误: DriverError: K:\NY TEST DATA\Counties\NY_Counties.shp: 没有那个文件或目录
我能够将 shapefile 写入映射的 s3 存储桶并且工作正常,但我无法读取存储在存储桶中的 shapefile。有谁知道怎么做?