code: def browse(self, max_lines=None, headers=None):
      
      if self.path.startswith('gs://'):
        lines = CsvFile._read_gcs_lines(self.path, max_lines)
      else:
        lines = CsvFile._read_local_lines(self.path, max_lines)
      if len(lines) == 0:
        return pd.DataFrame(columns=headers)
      columns_size = len(next(csv.reader([lines[0]], delimiter=self._delimiter)))
      if headers is None:
        headers = ['col' + newstr(e) for e in range(columns_size)]
      if len(headers) != columns_size:
        raise Exception('Number of columns in CSV do not match number of headers')
      buf = StringIO()
      for line in lines:
        buf.write(line)
        buf.write('\n')
      buf.seek(0)
      df = pd.read_csv(buf, names=headers, delimiter=self._delimiter)
      for key, col in df.iteritems():
        if self._is_probably_categorical(col):
          df[key] = df[key].astype('category')
      return df
docs: Try reading specified number of lines from the CSV object.
      Args:
        max_lines: max number of lines to read. If None, the whole file is read
        headers: a list of strings as column names. If None, it will use "col0, col1..."
      Returns:
        A pandas DataFrame with the schema inferred from the data.
      Raises:
        Exception if the csv object cannot be read or not enough lines to read, or the
        headers size does not match columns size.