Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Convert shape from GeoJSON to csv in Python
- import pandas as pd
- df = pd.read_json('/filepath/shape.json', lines=True)
- df_propr = df['properties'].apply(pd.Series)
- df_geom = df['geometry'].apply(pd.Series)
- df_exp = pd.concat([df_propr,df_geom], axis=1)
- df_exp.to_csv('/filepath/shape.csv')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement