When I uploaded a CSV file to MongoDB, one of the objects I chose as a number, but they came out to be Doubles. This later caused some issues and I don't want to reupload the CSV file. Is there an easy way to change Doubles into Int64s for one data type in Python3?
Asked
Active
Viewed 18 times
0
-
1Python doesn't tell a difference between the two, you can use numpy to set a precision for C like numbers, are you meaning to change the data as it stored in DynamoDB or after you have got it from there? – Uriya Harpeness Sep 24 '20 at 14:23
-
I had the original file as a csv and then I had it uploaded to MongoDB using the Compass tool. – inc_ Sep 24 '20 at 14:34
-
DynamoDB?? I'm using MongoDB. – inc_ Sep 24 '20 at 14:51
-
Sorry, do you want the type to change in MongoDB or in your code? – Uriya Harpeness Sep 24 '20 at 14:54
-
I want to change it in MongoDB. – inc_ Sep 24 '20 at 14:57
-
I found this answer, does it answer your case? https://stackoverflow.com/a/4973632/14273548 – Uriya Harpeness Sep 24 '20 at 15:01