Record keep on returning when deleted from database

Hi there,

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.

Regards
L.

1 Like

A followup,

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)
#opened_file.close()
apps_data = list(read_file)
appsapple_header = apps_data[0]
appsapple_data = apps_data[1:]

opened_file2 = open(‘googleplaystore.csv’)
read_file2 = reader(opened_file2)
#opened_file2.close()
appsg_data = list(read_file2)
appsgoogle_header = appsg_data[0]
appsgoogle_data = appsg_data[1:]

L.

1 Like

Hi @friendl74:

Similar topics was posted here and here.

Hope this helps!

1 Like

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?

Regards
L.

1 Like

Yes @friendl74 thanks for pointing this out. I have already edited them accordingly.

2 Likes

Hi Masterryan,

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?

1 Like

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!

1 Like

Yes, now it makes sense to me. Thanks.

1 Like

No worries. Anytime! :+1: