Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #terrorism_data =
- df=pd.read_csv('data/globalterrorismdb.csv',header='infer',
- encoding="cp1252",usecols=["eventid","iyear","imonth","iday","country_txt","region_txt","multiple","latitude"
- ,"longitude","targtype1_txt","weaptype1_txt","gname","nkill","related"])
- df.rename(columns={'eventid':'eventid','iyear':'year','imonth':'month','iday':'day','country_txt':'country','region_txt':'region',
- 'multiple':'multiple','latitude':'latitude','longitude':'longitude','targtype1_txt':'target_type','weaptype1_txt':'weapon_type','gname':'group_name',
- 'nkill':'fatalities'})
- #df1=df.set_index('eventid',drop=True)
- df = df.reindex_axis(year","month","day","country","region","multiple","latitude","longitude","target_type","weapon_type", "group_name", "fatalities", "related", axis=1)
- # YOUR CODE HERE
- #raise NotImplementedError()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement