Python:shapefile.Reader,如何设置.iloc?
当我在dataframe或geodataframe上迭代并想要设置某个部分时,我使用df.iloc[0:100]。当我使用shapefile.Reader时,如何设置某些节?例如,0-100行Python:shapefile.Reader,如何设置.iloc?,python,shapefile,Python,Shapefile,当我在dataframe或geodataframe上迭代并想要设置某个部分时,我使用df.iloc[0:100]。当我使用shapefile.Reader时,如何设置某些节?例如,0-100行 生成器不可下标,iterRecords返回生成器。相反,请使用形状记录或记录。它会给你一个列表 rows = shapefile.Reader(shapefile_path).shapeRecords()[0:100] for row_num, row in enumerate(rows): p
生成器不可下标,iterRecords返回生成器。相反,请使用形状记录或记录。它会给你一个列表
rows = shapefile.Reader(shapefile_path).shapeRecords()[0:100]
for row_num, row in enumerate(rows):
print(row_num, row)
rows = shapefile.Reader(shapefile_path).shapeRecords()[0:100]
for row_num, row in enumerate(rows):
print(row_num, row)