Alexander Aksjonov
Alexander Aksjonov

Reputation: 71

Dataframe mean calculation output seems wrong

I am trying to find a mean value of expressed gene, but pandas is giving me a different result than I would expect:

>>> np.mean(dataFrameLiverMean.loc[:,"ENSG00000000003.14"])
-1.708035422500241e-17
>>> dataFrameLiverMean.mean(axis=0)
ENSG00000000003.14    1.067522e-17
# clipped

See results here

What am I doing wrong?

Upvotes: 0

Views: 163

Answers (1)

Guillermo J.
Guillermo J.

Reputation: 103

Your mean is pretty much almost zero (10^-17), which is even below the data type's machine precision (numpy's float 64 has a precission of 2.22044604925e-16).

I think what you're observing is just noise.

Upvotes: 1

Related Questions