pandas/geopandas의 GeoDataFrame에서 단일 지점을 추출하는 데 문제가 있습니다.geodataframe 색인 생성시 geostructure 유지
사실 단일 색인 (iloc 또는 ix 사용)을 사용하면이 함수는 pd.Series 파일을 반환하므로 모든 속성과 메소드가 손실됩니다.
>>> type(OMS)
<class 'geopandas.geodataframe.GeoDataFrame'>
>>> type(OMS.iloc[2:3])
<class 'geopandas.geodataframe.GeoDataFrame'>
>>> type(OMS.iloc[2])
<class 'pandas.core.series.Series'>
효율적으로 데이터 구조/유형을 변경하지 않고 하나 개의 형상을 추출하는 방법이 있나요 : 이 내가 무슨 말입니까?
특히 추출 된 지점에 버퍼 메소드 (GeoDataFrame 및 GeoSeries 클래스 모두에 있음)를 적용해야합니다.
감사합니다.
'OMS.iloc [2 : 3]'또는'OMS.iloc [[2]]' –