New answers tagged


If df1 is the dataframe with geometry, you can do something like this: df = df1.merge(df2, on='geoid', how='left') If you are using CARTO, another solution could be using JOINs as explained here.


You should specify a common key using on parameter. I removed merged_ prefix for legibility. df = spatial_df.merge(tab_df, on='mukey', how='left') # df = tab_df.merge(spatial_df, on='mukey', how='right') gdf = gpd.GeoDataFrame(df) Sample spatial_df: col1 col2 mukey geometry 0 A 1.76 1 ... 1 B 0.40 2 ... 2 C 0.97 3 ... ...


You need to be more careful about your code. Already when you write layer = fields you change your dataframe to become a simple list. Your function denom doesn't return anything, and it should return a dataframe given how you use it in the multiprocessing. You never use Parallel in your code (it does not exist indeed), but use Pool. That's what you ...

Top 50 recent answers are included