.. include:: ../substitutions

.. oe:namespace:: OEChem

.. meta::
   :keywords: OEReadCSVHeader

.. oe:function:: OEReadCSVHeader

   .. oe:language:: c++ java csharp

      .. oe:api::

         bool OEReadCSVHeader(oemolistream& ifs, OECSVHeader& header,
                              unsigned int flavor = OEIFlavor::CSV::DEFAULT)

   .. oe:language:: python

      .. oe:api:: python

         OEReadCSVHeader(ifs: oemolistream, header: OECSVHeader, flavor: int) -> bool

   Attempt to read the first line of the file opened by ``ifs`` into a
   :ref:`OECSVHeader <OEChem_OECSVHeader>` object. This initializes the
   :ref:`OECSVHeader <OEChem_OECSVHeader>` object with column names described by
   that line. If :oe:const:`OEChem::OEIFlavor::CSV::Header` is not specified in
   the ``flavor`` argument or the first column of the first line is
   interpretable as :term:`SMILES`, then the column names will be
   initialized to the following pattern based upon the number of
   columns found in the first line: SMILES, TITLE, OE_CSV_COLUMN_1,
   OE_CSV_COLUMN_2, ..., OE_CSV_COLUMN_N.

   .. seealso::

      :ref:`section_moltaggeddata_CSV`


