title: Remove 'empty cells' as factor level
body: <p>I have a data frame which has one column and column has some data and some empty cells.
  When I am checking the levels of that column it is showing three levels as it is taking empty cells as one level. I want to delete that level.
  suppose I have</p>
  <pre><code>## editor note: starting from R 4.0.0, `stringsAsFactors` defaults to FALSE
  ## we now explicitly need `stringsAsFactors = TRUE`
  df &lt;- data.frame(fan = c(&quot;a&quot;,&quot;b&quot;,&quot; &quot;,&quot;a&quot;,&quot;b&quot;), stringsAsFactors = TRUE) 
  </code></pre>
  <p>I have tried this code</p>
  <pre><code>droplevels(df)
  </code></pre>
  <p>but it is not working.</p>