0

I have a pandas data frame with columns of data type float64.

I would like to increase the floating point precision to 200. I know you can do this with the BigFloat library.

I'm not sure what's the best way to increase the precision for floating point numbers in pandas.

  • So does `df.astype(BigFloat)` work? – EdChum Aug 20 '15 at 18:49
  • 1
    I just installed this library and my previous comment seemed to work – EdChum Aug 20 '15 at 18:58
  • It works but with decimal I can't install BigFloat. – DolphinGenomePyramids Aug 20 '15 at 19:09
  • I can't help with that as I've never used it, sounds like the libraries are conflicting. Are you able to just convert specific columns? – EdChum Aug 20 '15 at 19:11
  • You might want to do some searching on BigInteger questions and pandas, like http://stackoverflow.com/questions/31373134/pandas-python-reading-and-working-on-java-biginteger-large-numbers/31881284#31881284 I think you'll hit similar problems in that when you get away from standard int32/int64/float64/etc. you really lose a lot of the advantages of pandas as it will store big ints or floats as objects. You can still use pandas of course, it's just some speed and convenience will be lost relative to float64 and such. – JohnE Aug 20 '15 at 19:30
  • From your comment, is the problem that you can't install BigFloat? – casevh Aug 21 '15 at 14:43

0 Answers0