How could I put a large number in a datatype in Pandas?

Viewed 86

I have numbers in range from 0 to 3.4е+23. The "maximum" data format in this library is 'int64' (that is Хе+18).

Help me, please. How could I 'read' that data, because I want to train them with Sklearn. Also I can't apply StandartScaler/Normalizer for data, because numbers are large!

I change datatype like this:

df['df'] = df['df'].astype('int64')

Do you know some ways to change datatype? Or you know the way to do something for the whole DataFrame?

1 Answers

Have you tried declaring first a custom type based in the allowed in python large int? I haven't tested it, but here there is a way to use custom data types in Pandas

Related