A

Admin • 831.35K Points
Coach

Q. Which method allows you to fill NaN values with the previous non-null value?

  • (A) fillna(method='forward')
  • (B) fillna(method='ffill')
  • (C) fillna(method='bfill')
  • (D) fillna(method='pad')
  • Correct Answer - Option(B)
  • Views: 12
  • Filed under category Pandas
  • Hashtags:

Explanation by: Admin
`ffill` (forward fill) fills NaN values with the previous value.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.