Skip to main content

clean

Clean up NaNs from the dataset

Source Code: [link]

openbb.econometrics.clean(dataset: pd.DataFrame, fill: str = "", drop: str = "", limit: Optional[int] = None)

Parameters

NameTypeDescriptionDefaultOptional
datasetpd.DataFrameThe dataset you wish to cleanNoneFalse
fillstrThe method of filling NaNs. Choose from:
rfill, cfill, rbfill, cbfill, rffill, cffill
True
dropstrThe method of dropping NaNs. Choose from:
rdrop, cdrop
True
limitintThe maximum limit you wish to apply that can be forward or backward filledNoneTrue

Returns

TypeDescription
pd.DataFrameDataframe with cleaned up data