import csv


def into_dict(fIn,delimiter=","):
    """
    Read data from file into a dictionary. By default
    first element of each row is assigned to the key
    and the second element is assigned to the value.

    Parameters
    ----------
    fIn : str
      Path to input file
    delimeter : str (optional)
      Delimeter for parsing lines in file. (default is ',')
    
    """
    fIn = open(fIn,'r')
    fInReader = csv.reader(
        fIn,delimiter = delimiter, 
        quotechar = ' ', quoting = csv.QUOTE_NONE)
    d = {}
    for line in fInReader:
        if line: d[line[0]] = line[1]
    fIn.close()
    return d