【问题标题】:Geopandas for world map plotting from CSV files用于从 CSV 文件绘制世界地图的 Geopandas
【发布时间】:2021-11-14 00:15:24
【问题描述】:
df = gpd.read_file("world-polygon.shp")

df.head()

df = df(['Country', 'Confirmed'])

data_for_map = df.rename(index=str, columns={'Country':'Regions','Confirmed':'Conf'})

data_for_map.head()

它给了我错误

TypeError: 'GeoDataFrame' object is not callable

enter image description here

This image is of the code

【问题讨论】:

    标签: geopandas


    【解决方案1】:

    你需要更换

    df = df(['Country', 'Confirmed'])
    

    通过

    df = df[['Country', 'Confirmed']]
    

    【讨论】:

      猜你喜欢
      • 2021-10-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-05-25
      • 2022-01-27
      相关资源
      最近更新 更多