Na in params dict

Which parameter do I have to pass to get_data to replace NA / NULL with a given value? Example:

tmp=eik.get_data(tTickers, ['TR.AdjmtFactorAdjustmentDate', 'TR.AdjmtFactorAdjustmentType', 'TR.AdjmtFactorAdjustmentFactor'], {'SDate':ds, 'EDate':de, 'Curn':'USD', 'FRQ': 'D'})[0]

I would like to add to the dict a key,value pair such as: 'NAValues' : 0

Right now the function returns a NULL value that is taken by python as nan, however it is not np.nan or np.NAN.

Thanks,

Best Answer

  • There are three values that the 'NULL' parameter can take: ZERO, NA and BLANK, but nothing that you can customise, I am afraid.

    my pandas seems to think that this is a np.nan, so this call worked successfully:

    df.replace(np.nan, "your_value", inplace=True)

    and np.isnan() is True for the specific cell.

    Let me know if this works