扩大MULTIPOLYGON我有一个包含两个多边形和multipolygons如下shape文件:在geopanda数据帧
name geometry
0 AB10 POLYGON ((-2.116454759005259 57.14656265903432...
1 AB11 (POLYGON ((-2.052573095588467 57.1342600856536...
2 AB12 (POLYGON ((-2.128066321470298 57.0368357386797...
3 AB13 POLYGON ((-2.261525922489881 57.10693578217748...
4 AB14 POLYGON ((-2.261525922489879 57.10693578217748...
的第二和第三排对应组合区,而其余的都是多边形。 我想将几何图形为Multipolygon类型的行扩展为Polygon行,如下所示。
name geometry
0 AB10 POLYGON ((-2.116454759005259 57.14656265903432...
1 AB11 POLYGON ((-2.052573095588467 57.1342600856536...
2 AB11 POLYGON ((-2.045849648028651 57.13076387483844...
3 AB12 POLYGON ((-2.128066321470298 57.0368357386797...
4 AB12 POLYGON ((-2.096125852304303 57.14808092585477
3 AB13 POLYGON ((-2.261525922489881 57.10693578217748...
4 AB14 POLYGON ((-2.261525922489879 57.10693578217748...
请注意,AB11和AB12 Multipolygon已扩展为多行,其中每行对应一个多边形数据。
我认为这是geopanda数据处理。有没有一种pythonic的方式来实现上述?
谢谢!
这不会是没有非常有帮助一些上下文或一些代码来重现实际的数据帧。 –