src/pds_doi_service/core/input/input_util.py
def parse_csv_file(self, csv_path):
        """
        Parses DOIs from a file with a .csv extension.
        Each row within the CSV is parsed into a distinct DOI object.

        Parameters
        ----------
        csv_path : str
            Path to the CSV file to parse.

        Returns
        -------
        dois : List of Doi
            DOI objects parsed from the provided CSV file.

        Raises
        ------
        InputFormatException
            If the provided CSV file contains less than the expected number
            of columns.

        """
        logger.info("Parsing csv file %s", basename(csv_path))

        # Read the CSV file into memory
        csv_sheet = pd.read_csv(
            csv_path,
            # for all columns to be string,
            # e.g identifier could be 123 and translate into an int, that would break the code
            dtype=str,
            # Remove automatic replacement of empty columns with NaN
            na_filter=False,
            skip_blank_lines=True,
        )

        csv_sheet = self._validate_spreadsheet(csv_sheet)

        dois = self._parse_rows_to_dois(csv_sheet)

        return dois

        Parses DOIs from a file with a .csv extension.
        Each row within the CSV is parsed into a distinct DOI object.

        Parameters
        ----------
        csv_path : str
            Path to the CSV file to parse.

        Returns
        -------
        dois : List of Doi
            DOI objects parsed from the provided CSV file.

        Raises
        ------
        InputFormatException
            If the provided CSV file contains less than the expected number
            of columns.

        
Parses DOIs from a file with a .csv extension.
Each row within the CSV is parsed into a distinct DOI object.

Parameters

csv_path : str
Path to the CSV file to parse.

Returns

dois : List of Doi
DOI objects parsed from the provided CSV file.

Raises

InputFormatException
If the provided CSV file contains less than the expected number
of columns.
Parses DOIs from a file with a . csv extension . Each row within the CSV is parsed into a distinct DOI object . Parameters csv_path : str Path to the CSV file to parse . Returns dois : List of Doi DOI objects parsed from the provided CSV file . Raises InputFormatException If the provided CSV file contains less than the expected number of columns .
def parse_csv_file(self, csv_path):
        logger.info("Parsing csv file %s", basename(csv_path))
        csv_sheet = pd.read_csv(
            csv_path,
            dtype=str,
            na_filter=False,
            skip_blank_lines=True,
        )
        csv_sheet = self._validate_spreadsheet(csv_sheet)
        dois = self._parse_rows_to_dois(csv_sheet)
        return dois
def parse_csv_file ( self , csv_path ) : logger . info ( "Parsing csv file %s" , basename ( csv_path ) ) csv_sheet = pd . read_csv ( csv_path , dtype = str , na_filter = False , skip_blank_lines = True , ) csv_sheet = self . _validate_spreadsheet ( csv_sheet ) dois = self . _parse_rows_to_dois ( csv_sheet ) return dois
Parses DOIs from a file with a .csv extension.
Parses DOIs from a file with a . csv extension .
"""
        Parses DOIs from a file with a .csv extension.
        Each row within the CSV is parsed into a distinct DOI object.

        Parameters
        ----------
        csv_path : str
            Path to the CSV file to parse.

        Returns
        -------
        dois : List of Doi
            DOI objects parsed from the provided CSV file.

        Raises
        ------
        InputFormatException
            If the provided CSV file contains less than the expected number
            of columns.

        """ # Read the CSV file into memory # for all columns to be string, # e.g identifier could be 123 and translate into an int, that would break the code # Remove automatic replacement of empty columns with NaN
self
csv_path