cldscchttn icon

Convert shape from GeoJSON to csv in Python

cldscchttn | PRO | 06/24/24 01:16:59 PM UTC | 0 ⭐ | 833 👁️ | Never ⏰ | []
Python |

290 B

|

Source Code

|

0 👍

/

0 👎

# 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')

Comments