MCPcopy Create free account
hub / github.com/dabeaz-course/python-mastery / read_csv_as_instances

Function read_csv_as_instances

Solutions/5_3/reader.py:26–31  ·  view source on GitHub ↗

Read CSV data into a list of instances

(filename, cls, *, headers=None)

Source from the content-addressed store, hash-verified

24 return csv_as_dicts(file, types, headers=headers)
25
26def read_csv_as_instances(filename, cls, *, headers=None):
27 '''
28 Read CSV data into a list of instances
29 '''
30 with open(filename) as file:
31 return csv_as_instances(file, cls, headers=headers)
32

Callers

nothing calls this directly

Calls 1

csv_as_instancesFunction · 0.70

Tested by

no test coverage detected