title: Why am I seeing this error in while importing CSV file in Jupyter notebook?
body: <p>I am trying to import csv file using pandas in Jupyter notebook but I am getting Name not define error. I tried changing the root directory and paths but nothing worked so I am posting it here. </p>
  
  <pre><code>import os
  import pandas as pd
  
  
  df = pd.read_csv("bankloan.csv")
  df = pd.DataFrame(df)
  df.head()
  NameError                                 Traceback (most recent call last)
  </code></pre>
  
  <p> in 
  ----> 1 df.head()</p>
  
  <p>NameError: name 'df' is not defined</p>
  
  <p><a href="https://i.stack.imgur.com/7WRpI.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/7WRpI.png" alt="enter image description here"></a></p>