I need to save a tuple of 4 numbers inside a column that only accepts numbers (int or floats)
I have a list of 4 number like -0.0123445552, -29394.2393339, 0.299393333, 0.00002345556.
How can I “store” all these numbers inside a number and be able to retrieve the original tuple in Python?
Thanks
Following up on @YevgenYampolskiy’s idea of using numpy:
You could use numpy to convert the numbers to 16-bit floats, and then view the array as one 64-bit int:
Note: This requires numpy version 1.6 or better, as this was the first version to support 16-bit floats.