code: def readDir(dirPath, numLabels, modify=False):
    
    samplesDict = defaultdict(list)
    for _, _, files in os.walk(dirPath):
      for f in files:
        basename, extension = os.path.splitext(os.path.basename(f))
        if "." in basename and extension == ".csv":
          category = basename.split(".")[-1]
          if modify:
            category = category.replace("0", "/")
            category = category.replace("_", " ")
          samplesDict[category] = readCSV(
            os.path.join(dirPath, f), numLabels=numLabels)
  
    return samplesDict
docs: Reads in data from a directory of CSV files; assumes the directory only
    contains CSV files.
  
    @param dirPath            (str)          Path to the directory.
    @param numLabels          (int)          Number of columns of category labels.
    @param modify             (bool)         Map the unix friendly category names
                                             to the actual names. 0 -> /, _ -> " "
  
    @return samplesDict       (defaultdict)  Keys are CSV names, values are
        OrderedDicts, where the keys/values are as specified in readCSV().