Executing 'del data[index]' - Doing Guided Project on Local

Hi all,

I’m currently on screen no. 3 (“Deleting Wrong Data”) in the mobile app guided project. I have found the row in question and have deleted it. As I’m working on my local Jupyter, when I want to stop working on the project, I’ll halt and close the notebook.

Mission Screen Link: https://app.dataquest.io/m/428/guided-project%3A-profitable-app-profiles-for-the-app-store-and-google-play-markets/3/deleting-wrong-data

When I re-open, I believe I have to run Kernel > Restart + Run All to have existing codes executed and variables properly assigned before continue coding.

My question:

  1. As I have executed del data(index) during the previous session, should I have this line commented out from now onwards to prevent the wrong deletion of rows in the data set?
  2. Is there another way besides using Kernel > Restart + Run All?

It’s not possible for me to complete the project in one go hence closing and re-opening the notebook. Thanks.


1 Like

As you said you would do halt and close previous session then, it is fine to re-run del data(index) unless you are saving it to memory or back to actual file. But do not run this twice in same session else you would get error or delete wrong data.

I don’t have any another idea in mind right now but same time I don’t see any problem with this.

Just to clarify, when you said “saving it to memory or back to actual file”, are you referring to the action of saving the notebook and creating a checkpoint?

No not that. I was talking about csv file.

Alright, don’t think I do anything directly on the CSV files. Thanks Dishin for your help! :slightly_smiling_face:

1 Like