Demo entry 6635037

py

   

Submitted by anonymous on Aug 16, 2017 at 09:54
Language: Python. Code size: 493 Bytes.

DATADIR = ""
DATAFILE = "745090.csv"
datafile = os.path.join(DATADIR, DATAFILE)
def parse_file(datafile):
    name = ""
    data = []
    with open(datafile,'rb') as f:
        name = f.readline().split(',')[1][1:-1]
        print name
        header = f.readline().split(',')
        # print header
        r = csv.reader(f)
        # print r
        for line in r:
            data.append(line)
    print data    
    # Do not change the line below
    return (name, data)

This snippet took 0.00 seconds to highlight.

Back to the Entry List or Home.

Delete this entry (admin only).