I have a dfAB
import pandas as pd
import random
A = [ random.randint(0,100) for i in range(10) ]
B = [ random.randint(0,100) for i in range(10) ]
dfAB = pd.DataFrame({ 'A': A, 'B': B })
dfAB
We can take the quantile function, because I want to know the 75th percentile of the columns:
dfAB.quantile(0.75)
But say now I put some NaNs in the dfAB and re-do the function, obviously its differnt:
dfAB.loc[5:8]=np.nan
dfAB.quantile(0.75)
Basically, when I calculated the mean of the dfAB, I passed skipna to ignore Na's as I didn't want them affecting my stats (I have quite a few in my code, on purpose, and obv making them zero doesn't help)
dfAB.mean(skipna=True)
Thus, what im getting at is whether/how the quantile function addresses NaN's?
NaN
values and play around for a few minutes. – Oddfellow