Not defined error

Screen Link:
My Code:

def explore_data(dataset, start, end, rows_and_columns=False):
    dataset_slice = dataset[start:end]    
    for row in dataset_slice:
        print('\n') # adds a new (empty) line after each row
    if rows_and_columns:
        print('Number of rows:', len(dataset))
        print('Number of columns:', len(dataset[0]))
In [9]:

print('Apple Store')
print(explore_data(app_store_data, 0, 3, TRUE))
print('Google Play')
print(explore_data(google_play_data, 0, 3, TRUE))
Replace this line with your code

What I expected to happen:

What actually happened:

Apple Store

NameErrorTraceback (most recent call last)
<ipython-input-9-b729f4dd94ea> in <module>()
      1 print('Apple Store')
      2 print('/n')
----> 3 print(explore_data(app_store_data, 0, 3, TRUE))
      4 print('n/')
      5 print('Google Play')

NameError: name 'app_store_data' is not defined

Replace this line with the output/error

Apple_store_data isn’ t defined in my code. Where should I write this?

1 Like

Did you store the csv file in app_store_data? Please provide your jupyter notebook file so that I can better assist.

Hi thanks Ryan

As you mentioned , I have attached the screenshot of Jupiter.

It seems like it could be downloaded correctly.

Kind regards,


Hi @nextlevellearning123:

Sorry if my previous message was unclear but I would need your uploaded notebook here to provide further assistance.

Is it Ok?

You may use this guide to aid you in uploading it. Step 2 is not necessary.

As soon as I clicked the file page, the error below happened.

Something went wrong! We are working on resolving the issue as quickly as possible, so you can get back to learning.

Please check for updates.

Error Details:

Bad gateway

The web server reported a bad gateway error.

  • Ray ID: 5d8303939ead950f
  • Your IP address: 2400:4050:3480:eb00:4980:50f8:9dd4:6a00
  • Error reference number: 502
  • Cloudflare Location: Tokyo

@nextlevellearning123: you clicked File > Download As > .ipynb and it timed out? Please check your Internet connection in the meantime.

@nextlevellearning123, I was experiencing the same problem but it’s been resolved now. You should be able to access the page now.

I couldn’t open th page despite downloding.

What was the name of the variable to which you stored apple store data?
Was it app_store_data or 'apple_store_data`?

print(explore_data(app_store_data, 0, 3, TRUE))
if it is different from the variable in bold, please change and try again.

print(explore_data(apple_store_data, 0, 3, TRUE))