Pandas has a parameter nrows for selecting how many rows will be read into the dataframe. Does GeoPandas have a similar parameter? Couldn't find in the documentation.


See Only read specific rows of a shapefile with GeoPandas / Fiona:

import geopandas as gpd
import fiona

c = fiona.open(r'C:\someshapefile.shp')
df = gpd.GeoDataFrame.from_features(c[0:5])
|improve this answer|||||

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.