class_docstr: CSV record parser
class_docstr_tok: ["CSV","record","parser"]
docstr: Parse a single csv row using the specified schema
  
  Args:
      row (list): A list of strings representing a csv row
      schema (dict): Schema to be used for parsing
  
  Returns:
      dict: Parsed row with the corresponding schema
docstr_tok: ["Parse","a","single","csv","row","using","the","specified","schema","Args",":","row","(","list",")",":","A","list","of","strings","representing","a","csv","row","schema","(","dict",")",":","Schema","to","be","used","for","parsing","Returns",":","dict",":","Parsed","row","with","the","corresponding","schema"]
code: def _parse_row(self, row, schema):
      """Parse a single csv row using the specified schema
  
      Args:
          row (list): A list of strings representing a csv row
          schema (dict): Schema to be used for parsing
  
      Returns:
          dict: Parsed row with the corresponding schema
      """
      # check number of columns match
      if len(row) != len(schema):
          return False
  
      parsed_payload = {}
      for index, key in enumerate(schema):
          # if the value for this key in the schema is a dict, this must be a nested
          # value, so we should try to parse it as one and use the result
          if isinstance(schema[key], dict):
              parsed_data = self._extract_records(
                  [row[index]], schema[key]
              )
              if parsed_data and parsed_data[0][1] is True:
                  parsed_payload[key] = parsed_data[0][0]
                  continue
  
              return (
                  False  # break the loop if the nested data was invalid
              )
  
          # extract the keys from the row via the index
          parsed_payload[key] = row[index]
  
      return parsed_payload
  
imports: from abc import ABCMeta, abstractmethod
  from copy import deepcopy
  import csv
  from fnmatch import fnmatch
  import json
  import logging
  import re
  import io
  import jmespath
  from streamalert.shared.logger import get_logger
label_desc: Use image node_id 7 for calling the CSVParser obj's underlying member method code with example usage: obj._parse_row(row, schema) and returns: parsed_payload, False, False