TypeError: keys must be str, int, float, bool or None, not builtin_function_or_method

问题描述 投票:0回答:0

我正在尝试获取等值线图,但出现此错误

TypeError: keys must be str, int, float, bool or None, not builtin_function_or_method

import requests
import json

df3 = pd.read_csv('potenciar-trabajo-total-titulares-2022-10-01.csv',low_memory=False)

repo_url = 'https://infra.datos.gob.ar/catalog/modernizacion/dataset/7/distribution/7.12/download/provincias.geojson'
ar_regions_geo = requests.get(repo_url).json()


fig = px.choropleth(
    df3,
    locations="id",
    geojson=ar_regions_geo,
    color="titulares")

fig.show()

期待得到等值线图

python json maps geojson choropleth
© www.soinside.com 2019 - 2024. All rights reserved.