Screen Link:
My Code:
opened_file = open('AppleStore.csv')
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)
for app in apps_data[1:]:
price = float(app[4])
if price == 0:
app.append('free')
elif price > 0 and price < 20:
app.append('affordable')
elif price >= 20 and price < 50:
app.append('expensive')
elif price >= 50:
app.append('very expensive')
apps_data[0].append('price_label')
What I expected to happen: When run in Jupyter Notebook, this code does not return the actual price categories in the ‘if-statement.’ i.e. It does not create a new entry for each app which tells you if the app is free, expensive, etc… I’m wondering if this is accurate outside of the DQ platform, i.e. in the real world.
What actually happened:
When run in Jupyter Notebook, this code does not return the actual price categories specified in the 'if-statement.' i.e. It does not create a new entry for each app which tells you if the app is free, expensive, etc... I'm wondering if this is accurate outside of the DQ platform, i.e. in the real world.