title: Should I use `with open(file):` if I `pd.read_csv`?
body: <h1><strong>Context</strong></h1>
  
  <p><a href="https://stackoverflow.com/a/8011836/5433628">I've learned</a> that one should use <code>with open</code> when reading files in Python:</p>
  
  <pre><code>import csv
  
  with open('employee_birthday.txt') as csv_file:
      csv_reader = csv.reader(csv_file, delimiter=',')
      line_count = 0
      for row in csv_reader:
          if line_count == 0:
              print(f'Column names are {", ".join(row)}')
              line_count += 1
          else:
              print(f'\t{row[0]} works in the {row[1]} department, and was born in {row[2]}.')
              line_count += 1
      print(f'Processed {line_count} lines.')
  </code></pre>
  
  <p>(<a href="https://realpython.com/python-csv/" rel="noreferrer">source</a>)</p>
  
  <p>However, I've seen multiple examples where this structure is not used when using pandas' <code>pd.read_csv</code>:</p>
  
  <pre><code># Load the Pandas libraries with alias 'pd' 
  import pandas as pd 
  # Read data from file 'filename.csv' 
  # (in the same directory that your python process is based)
  # Control delimiters, rows, column names with read_csv (see later) 
  data = pd.read_csv("filename.csv") 
  # Preview the first 5 lines of the loaded data 
  data.head()
  </code></pre>
  
  <p>(<a href="https://www.shanelynn.ie/python-pandas-read_csv-load-data-from-csv-files/" rel="noreferrer">source</a>)</p>
  
  <h1>Question</h1>
  
  <p>➥ <strong>Should I use <code>with open():</code> when reading <code>.csv</code> files using pandas' <code>pd.read_csv</code>?</strong><br>
  (Or is <code>pd.read_csv</code> already smart enough?)</p>