Going fast! #DataquestChallenge Premium Annual Offer:
500 get 50% & the next 1000 get 40% off.
GET OFFER CODE

NameError: name 'android' is not defined

Screen Link:

https://app.dataquest.io/m/350/guided-project%3A-profitable-app-profiles-for-the-app-store-and-google-play-markets/3/deleting-wrong-data

My Code:

print(android[10472])  # incorrect row
print('\n')
print(android_header)  # header
print('\n')
print(android[0])      # correct row

What I expected to happen:

[‘Life Made WI-Fi Touchscreen Photo Frame’, ‘1.9’, ‘19’, ‘3.0M’, ‘1,000+’, ‘Free’, ‘0’, ‘Everyone’, ‘’, ‘February 11, 2018’, ‘1.0.19’, ‘4.0 and up’]

[‘App’, ‘Category’, ‘Rating’, ‘Reviews’, ‘Size’, ‘Installs’, ‘Type’, ‘Price’, ‘Content Rating’, ‘Genres’, ‘Last Updated’, ‘Current Ver’, ‘Android Ver’]

[‘Photo Editor & Candy Camera & Grid & ScrapBook’, ‘ART_AND_DESIGN’, ‘4.1’, ‘159’, ‘19M’, ‘10,000+’, ‘Free’, ‘0’, ‘Everyone’, ‘Art & Design’, ‘January 7, 2018’, ‘1.0.0’, ‘4.0.3 and up’]

What actually happened:

got a name error.

NameErrorTraceback (most recent call last)
<ipython-input-6-09c425c1f66c> in <module>()
----> 1 print(android[10472])  # incorrect row
      2 print('\n')
      3 print(android_header)  # header
      4 print('\n')
      5 print(android[0])      # correct row

NameError: name 'android' is not defined

I already refreshed the ‘project frame’ and the ‘project’s missing files’ but get the same error. This project was working fine yesterday, but after reopening the dataquest website and the notebook (running from within dataquest, not on my computer) today I’m getting this error. I have searched the forums and found no relevant answers. I feel like I must be missing something small here…thanks

Hey.

Did you rerun your whole project? After the kernel dies, it won’t remember anything that was done before and you need to rerun it.

1 Like

Hi Bruno. That did it, thanks!

I went to Kernel > Restart and Run All and everything works as expected now.

2 Likes

Hi,
I got the same problem, but nothing helps.
restart or restart and run all , nothing helps. I got stuck
Can you please help ?
thanks

Hi @hristofor.angelov and welcome to the community!

Sounds like you’re having a different problem than the original poster. Please create a new post and include any error messages you might be getting along with your code and link to the mission you’re working on.

1 Like