import csv


def ReadFile(f, tsv=False):
  """Read the CSV file, returning the column names and rows."""

  if tsv:
    c = csv.reader(f, delimiter='\t', doublequote=False,
                   quoting=csv.QUOTE_NONE)
  else:
    c = csv.reader(f)

  # The first row of the CSV is assumed to be a header.  The rest are data.
  col_names = []
  rows = []
  for i, row in enumerate(c):
    if i == 0:
      col_names = row
      continue
    rows.append(row)
  return col_names, rows