Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- GeoDataFrame.from_postgis(sql, con, geom_col='geom', crs=None, index_col=None,
- coerce_float=True, params=None)
- import geopandas as gpd
- import psycopg2 /*(if it is postgres/postgis)
- con = psycopg2.connect(database="your database", user="user",password="password",host="your host")
- sql= "select geom, x,y,z from your_table"
- df=gpd.GeoDataFrame.from_postgis(sql,con,geom_col='geom' )
Add Comment
Please, Sign In to add comment