# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ### 1) Pandas fillna()
# ### 2) Parameters of fillna()
# ### 3) fillna value
# ### 4) fillna method
# ### 5) fillna axis
# ### 6) fillna inplace
# ### 7) fillna limit

import pandas as pd
df=pd.read_csv('csv_files/Fortune_10.csv')
df

df.fillna({'Companies':'none','Growth':0})

df.fillna(method='ffill') # forward fill

# backward fill
df.fillna(method='bfill')

df.fillna(axis=0,method='ffill')

df.fillna(axis=1,method='ffill')

df.fillna(axis=1,method='bfill')

df.fillna(0,limit=2)

df.fillna(method='ffill',limit=2)

df.fillna(5,inplace=True)
df

df



StarcoderdataJupyterScriptsDedupFiltered