An error in pandas, python . Please give me a hint -
an coursera assignment question . coding follows :
in:
def answer_seven(): pop = census_df[['stname','ctyname','popestimate2015','popestimate2014','popestimate2013','popestimate2012','popestimate2011','popestimate2010']] pop = pop[pop['stname']!=pop['ctyname']] index = (pop.max(axis=1)-pop.min(axis=1)).argmax() return census_df.loc[index]['ctyname'] answer_seven
out:
what's wrong? should index name.
Comments
Post a Comment