Quantile 0.75

Options
Linda97
Linda97 Registered Posts: 4

Hello,

I want to fill missing value of a column with Quantile 0.75.

Thanks

Tagged:

Answers

  • shashank
    shashank Dataiker, Dataiku DSS Core Designer, Dataiku DSS ML Practitioner, Dataiku DSS Adv Designer, Registered Posts: 27 Dataiker
    Options

    Need to use Python Recipe to Impute the values with quantile 0.75:

    Use numpy to calculate the quantile and then fill NA with the value

    import pandas as pd, numpy as npquat75 = np.quantile(df.<col_name>.notnull(),.75)newDf = pd.DataFrame(df.<col_name>.fillna(quat75))

    Merge the newDF with the original Df and write it in output dataset

  • Linda97
    Linda97 Registered Posts: 4
    Options

    Thank you so much

Setup Info
    Tags
      Help me…