title: How to label missing values in python using loop
body: <p>this is my Dataframe</p>
  <pre><code>from cmath import nan
  
  
  student_card = pd.DataFrame({'ID':[20190103, 20190222, 20190531],
                               'name':['Kim', nan, nan],
                               'class':['H', 'W', 'S']})
  student_card
  </code></pre>
  <p>it looks like this</p>
  <p><a href="https://i.stack.imgur.com/iWMcZ.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>so there are two NaN values in 'name' columns, and I want to fill them as 'missing1', 'missing2' using loop (idk not using loop but have no idea how to index them without loop)</p>
  <p>so I made this function and got stuck over here. It doesn't work
  please give me some helps, thanks</p>
  <pre><code>import pandas as pd
  
  def fillna_func(df):
      df = df.copy()
      for i, value in enumerate(df.values):
          if value == nan:
              df[i].apply(&quot;deleted{}&quot;.format(i))
      return df
  
  
  fillna_func(student_card['name'])
  </code></pre>