I’m working through my first project and using Jupyter. In cleaning the data for the ‘googleplaystore.csv’ the directions say to delete a row using “del” and the index. It also says that if you run that cell again, you can accidentally delete the new row at that index. Since there is an option to run all cells, I was wondering if there is a way to tag certain cells to be skipped when you Run All so you don’t accidentally delete a row. It seems like there may be other cases too where you wouldn’t want a cell run repeatedly. Or should Run All not be used? I’m new so I appreciate thoughts on this. Thanks!
It’s my understanding that when you use Run All, Jupyter “deletes” all outcomes and run all cells until the last one or until an error is found
Hello @veronica.robin.willi and welcome to the community! I believe the only option to skip the cell when
run all is to comment out the code in that cell or make it a markdown cell. I hope this helps
Ok, so maybe it’s a non-issue in this case. I’m going to set up this code in another Jupyter notebook and see how it behaves. I’m still learning about state and how the code is processed, so I appreciate your response.
Hi annalisa! Thanks for the welcome! I’m going to play with the code that I was working on in another notebook and see how it works trying commenting it out and also just using
run all. In my head I was thinking it would delete a row every time I ran it, but maybe not…
If you run all, you reconstruct all the variables again, so you loose all the previous results, I think what the instructions meant was that if you re run the same cell again, then you execute the same command again and therefore if the cell is to delete row 5 in the dataframe for example, if you execute that cell multiple times, it will keep deleting what is currently row 5 (so you will keep deleting rows).
Ok, thank you for explaining it.