Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[split] Python Question
#11
Dear Team,

I am using Geo Maps for analysis purpose, tried install the geopandas to read the .shp files.
using below mentioned logic to read the .shp fle

shp_path = r"C:\Users\HP\Desktop\Covid\updated\Usa_States.shp"
map_data = shp.Reader(shp_path, "rb")
map_data.rename(columns = {'st_nm':'States/UT'}, inplace = True)
map_data.head()

I am getting error below
AttributeError: 'Reader' object has no attribute 'rename'


Main Problem is cannot able to install geopandas

map_data = gpd.read_file('Indian_States.shp')
map_data.rename(columns = {'st_nm':'States/UT'}, inplace = True)
map_data.head()

Request you to help on this

Thanks and Regards,
Seetharam
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  [split] [split] New to the forum, how to post a question? karnik 2 1,279 Feb-12-2022, 03:45 PM
Last Post: deanhystad
  [split] question about list comprehension Armin 17 5,667 Jan-29-2020, 04:32 PM
Last Post: Clunk_Head

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020