for app in android:
name = column
if name == 'Instagram':
The code above is outputting neither a result nor an error message. It runs and doesn't display anything.
for column in google_data:
name = column
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’]
As per the code you have shared here, in the above loop you are iterating through a variable called
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. But instead you have accessed
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
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