0

I am getting the error 'method' object is not subscriptable . Please tell me about this error ? and what is the problem in my code ?

def answer_five():
    census = census_df.copy()
    census.set_index['STNAME]
    return (census['COUNTY']).argmax()
answer_five()
Aditya
  • 1
  • 1

1 Answers1

0
census.set_index(['STNAME'])

Try this code on place of census.set_index['STNAME]