Hi everyone
During the fundamentals python missions you come across a couple of missions where you need to append a label to the data set (apps_data) in a new column using a for loop.
Afterwards you have to append a column name to the data set.
In the for loop you have to append the label to the iterator (app)?? And then the labels are apparently appended to the apps_data when the loop has run.
I would think you should append it to the apps_data during the looping.
Example:
for app in apps_data[1:]:
price = float(app[4])
if price == 0.0:
app.append('free')
else:
app.append('non-free')
apps_data[0].append(‘free_or_not’)
Can someone explain the logic or what I am missing?
Thanks