🔌 Application Programming Interface#
CSV Data reader.
- class CSVDataReader#
Bases:
object
CSV
Data reader.Example
>>> from pprint import pprint >>> from galactic.io.data.csv import CSVDataReader >>> reader = CSVDataReader() >>> import io >>> data = '''age,height ... 46,202 ... 36,183 ... 204,230 ... 36,180 ... 23,150 ... 23,172 ... ''' >>> data = reader.read(io.StringIO(data)) >>> pprint(data) {'0': {'age': '46', 'height': '202'}, '1': {'age': '36', 'height': '183'}, '2': {'age': '204', 'height': '230'}, '3': {'age': '36', 'height': '180'}, '4': {'age': '23', 'height': '150'}, '5': {'age': '23', 'height': '172'}}