geopandas.GeoDataFrame.from_file

classmethod GeoDataFrame.from_file(filename, **kwargs)

Alternate constructor to create a GeoDataFrame from a file.

Can load a GeoDataFrame from a file in any format recognized by fiona. See http://fiona.readthedocs.io/en/latest/manual.html for details.

Parameters
filenamestr

File path or file handle to read from. Depending on which kwargs are included, the content of filename may vary. See http://fiona.readthedocs.io/en/latest/README.html#usage for usage details.

kwargskey-word arguments

These arguments are passed to fiona.open, and can be used to access multi-layer data, data stored within archives (zip files), etc.

Examples

>>> df = geopandas.GeoDataFrame.from_file('nybb.shp')