Skip to main content
deleted 4 characters in body
Source Link

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice of rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read the 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice of rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read the 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice of rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))

edited body
Source Link

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice orof rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read the 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice or rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read the 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice of rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read the 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))

Source Link

Geopandas 0.7 added a new rows parameter to read_file. You can use it to read the first n rows, or a specific slice or rows.

import geopandas as gpd

# Read the first 100 rows
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=100)

# Read the 5 rows from the 100000th
gdf = gpd.read_file("/path/to/my/shapefile.shp", rows=slice(100000, 100005))