On the Guided project (5. Removing Duplicate Entries: Part Two), when I delete record 10472, because of the 3.0M error in the field. If I run the all the cells again, it reappears! And I get the error again trying to covert 3.0M to float.
What’s going on?
Can an official DataQuest support person please help me! I cannot progress on my course.
I think because I run this each time, the row 10472 reappears. Meaning I have to delete it every time.
I should run this just once right?
from csv import reader
opened_file = open(‘AppleStore.csv’)
read_file = reader(opened_file)
apps_data = list(read_file)
appsapple_header = apps_data
appsapple_data = apps_data[1:]
opened_file2 = open(‘googleplaystore.csv’)
read_file2 = reader(opened_file2)
appsg_data = list(read_file2)
appsgoogle_header = appsg_data
appsgoogle_data = appsg_data[1:]
Similar topics was posted here and here.
Hope this helps!
Thank you so much for the quick response.
Both these posts need to be tagged with right tags so other users who experience this problem can find a solution easy?
Yes @friendl74 thanks for pointing this out. I have already edited them accordingly.
Could elaborate a little on how a kernel restart affects the deletion? I was having the same issue as friendl74, and based on the posts that you referred him to, it appears that the record was reappearing because I ran “Kernel --> Restart and Run All”.
I was under the impression that the record was being deleted from the file, but based on this behavior it appears that the record is being deleted from the memory used by the notebook. Is this correct?
Hi @data.jedi.ken: all local variables will be removed (and reverted to the original). So if you attempted to delete a record initially and then clear the Runtime using the
Restart and Run All command, it will not be removed unless u do the deletion again.
Hope this helps!
Yes, now it makes sense to me. Thanks.