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

Method __getitem__

Solutions/2_6/colreader.py:14–16  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

12 return len(self.column_data[0])
13
14 def __getitem__(self, index):
15 return dict(zip(self.column_names,
16 (col[index] for col in self.column_data)))
17
18
19def read_csv_as_columns(filename, types):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected