Profitable app project screen 4/14 Output error

for app in android:
    name = column[0]
    if name == 'Instagram':

The code above is outputting neither a result nor an error message. It runs and doesn't display anything.

unique_apps =
duplicate_apps =

for column in google_data:
name = column[0]
if name in unique_apps:

print(‘Number of duplicate apps’,len(duplicate_apps))
print(‘Examples of duplicate apps’,duplicate_apps[:7])

Just the first letter of apps names is being displayed


Number of duplicate apps 10746

Examples of duplicate apps [‘P’, ‘P’, ‘S’, ‘T’, ‘P’, ‘3’, ‘L’]

Hi @josegabrielcontact

As per the code you have shared here, in the above loop you are iterating through a variable called app

for app in android

So the variable app stores each rows of android dataset. Since android is a list of list, app will be one list containing details about an app.

If you were to get the name of an app, which I assume to be at the first item in the list, you will have to access app[0]. But instead you have accessed column[0].

The variable column is not defined within your loop hence it won’t be returning the name of the apps.

So if you make necessary changes in this line, it will hopefully get sorted out. Don’t get confused by the variable names. The variable names can be anything. Just because we named it app or column it doesn’t mean that the variables are returning a value in accordance with the meaning of their names., if that caused any confusion to you.

I hope this helps