xdufacool/collect_local.py
def load_csv_to_dict(filename):
    """Load a CSV file into a dict with the first column as the key."""
    row_len = list()
    result = dict()
    with open(filename, 'r') as csvfile:
        reader = csv.reader(csvfile)
        for row in reader:
            key = row[0].strip()
            values = [v.strip() for v in row[1:]]
            result[key] = values
            row_len.append(len(values))
    return result, max(row_len)
Load a CSV file into a dict with the first column as the key.
Load a CSV file into a dict with the first column as the key.
Load a CSV file into a dict with the first column as the key .
def load_csv_to_dict(filename):
    row_len = list()
    result = dict()
    with open(filename, 'r') as csvfile:
        reader = csv.reader(csvfile)
        for row in reader:
            key = row[0].strip()
            values = [v.strip() for v in row[1:]]
            result[key] = values
            row_len.append(len(values))
    return result, max(row_len)
def load_csv_to_dict ( filename ) : row_len = list ( ) result = dict ( ) with open ( filename , 'r' ) as csvfile : reader = csv . reader ( csvfile ) for row in reader : key = row [ 0 ] . strip ( ) values = [ v . strip ( ) for v in row [ 1 : ] ] result [ key ] = values row_len . append ( len ( values ) ) return result , max ( row_len )
Load a CSV file into a dict with the first column as the key.
Load a CSV file into a dict with the first column as the key .
"""Load a CSV file into a dict with the first column as the key."""
filename