Entering edit mode
9.3 years ago
QVINTVS_FABIVS_MAXIMVS
★
2.6k
I have a pandas data frame with mixed types
I would like to increase the floating point precision of the columns with float64 to 500 point precision.
Is there an easy solution using decimal library? I'm having some troubles with the current methods.
from decimal import *
getcontext().prec = 500
df['floating'] = df['floating'].astype(Decimal)
df['phred'] = -10 * np.log10(1-df['floating'])
Error:
AttributeError: 'float' object has no attribute 'log10
I hope you've considered whether any of the initial values that you're using even have 500 significant digits.
BTW, this is pretty off-topic.
They sure do