pandas.DataFrame.fillna() Flashcards
Describe what the method .fillna() does ?
Fill NA / NaN values using the specified method
what is the first param. in the method .fillna()?
value=
what are the acceptable inputs to the param. value= ?
scalar, dict, Series, or Dataframe
what is the 2nd param. to the method .fillna()
method
what does the param. method do?
It determines the method you want to fill in holes in reindexed Series.
what input for the method param propagates last valid observation forward to the next valid obersevation?
pad or ffill
What input for the param. method uses the next valid observation to fill in the gap?
backfill or bfill
what is the third param. of .fillna() and what does it determine?
axis,
axis along which to fill missing values
what is the fifth param of .fillna() and what does it determine?
limit,
if the method is specified, this is the max number of consecutive NaN values to forward/backward fill.
what parameter cannot be a list in .fillna()?
value
If I specify the param. method of .fillna() do I need to give the param. value an input?
No