How To Calculate Cdf In Python Dataframe
I have below Dataframe: DP1 DP2 DP3 DP4 DP5 DP6 ... DP13 DP14 DP15 DP16 DP17 DP18 OP1 NaN
Solution 1:
Solution with remove missing values with infinitive values is:
c = ResampledDF.iloc[1][::-1].replace(np.inf, np.nan).dropna().cumprod()
ResampledDF = ResampledDF.append(c.rename('CDF'))
Post a Comment for "How To Calculate Cdf In Python Dataframe"