pandas.DataFrame.fillna() Flashcards

1
Q

Describe what the method .fillna() does ?

A

Fill NA / NaN values using the specified method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

what is the first param. in the method .fillna()?

A

value=

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

what are the acceptable inputs to the param. value= ?

A

scalar, dict, Series, or Dataframe

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

what is the 2nd param. to the method .fillna()

A

method

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

what does the param. method do?

A

It determines the method you want to fill in holes in reindexed Series.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

what input for the method param propagates last valid observation forward to the next valid obersevation?

A

pad or ffill

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What input for the param. method uses the next valid observation to fill in the gap?

A

backfill or bfill

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

what is the third param. of .fillna() and what does it determine?

A

axis,

axis along which to fill missing values

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

what is the fifth param of .fillna() and what does it determine?

A

limit,

if the method is specified, this is the max number of consecutive NaN values to forward/backward fill.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

what parameter cannot be a list in .fillna()?

A

value

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

If I specify the param. method of .fillna() do I need to give the param. value an input?

A

No

How well did you know this?
1
Not at all
2
3
4
5
Perfectly