Geopandas for world map plotting from CSV files

Viewed 61
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()

It gives me the error

TypeError: 'GeoDataFrame' object is not callable

enter image description here

This image is of the code

1 Answers

You need to replace

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

by

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