设置 Geopandas 行/列显示

我正在使用 dpg.read_file(....geojson) 将 geojson 读入我的 PyCharm。我想进一步操作“几何”列,但想先看看那里有什么。虽然当我打印前几行时,我只能看到形状的一个顶点 (x,y)。在我读过的大熊猫中,您可以使用 set_option 参数,但我无法为 Geopandas 找到类似的东西。我查看了 Geopandas 文档并找到了 gpd.options.display_precision = 10,但仍然无法读取其余数据。有什么建议吗?

import geopandas as gpd

gpd.options.display_precision = 10
file = gpd.read_file(r'C:\Users\Zach\Downloads\11-05-21_1934.geojson')
print(file.geometry.head(5))
C:\Users\Zach\anaconda3\envs\Script\python.exe C:/Users/Zach/Script/test.py
0    POLYGON ((-122.6737941589 44.1679239597,-122....
1    POLYGON ((-122.6740961583 44.1679239597,-122....
2    POLYGON ((-122.6748683477 44.1679231598,-122....
3    POLYGON ((-122.6748090629 44.1679234265,-122....
4    POLYGON ((-122.6736564471 44.1679226266,-122....
Name: geometry,dtype: geometry

Process finished with exit code 0
iCMS 回答:设置 Geopandas 行/列显示

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/432366.html

大家都在问