Open komzy opened 2 years ago
You are not passing a dask.dataframe to dask_geopandas.from_dask_dataframe
. When you call compute()
, dask computes the task graph and returns a pandas dataframe. The code above should be like this if you want to read with dask.dataframe:
dask_df = dd.read_json('madagascar_gen.txt',orient='list')
dgpd = dask_geopandas.from_dask_dataframe(dask_df, geometry="geometry")
But given the file is geojson, you will need to create geometry array yourself. The better option would be to read directly with dask-geopandas.
dgpd = dask_geopandas.read_file("madagascar_gen.json", npartitions=4)
I'm writing a simple code to read a large geojson file (>3 GB) into dask and convert to dask-geopandas dataframe. However I run into the above error.
Here's my code:
Error log:
madagascar_gen.json:
Anyone know why this is happening?