bandicoot.io.
read_csv
(user_id, records_path, antennas_path=None, attributes_path=None, recharges_path=None, network=False, duration_format='seconds', describe=True, warnings=True, errors=False, drop_duplicates=False)¶Load user records from a CSV file.
Parameters: |
|
---|
Notes
None
. For example, if the column
call_duration
is empty for one record, its value will be None
.
Other values such as "N/A"
, "None"
, "null"
will be
considered as a text.Examples
>>> user = bandicoot.read_csv('sample_records', '.')
>>> print len(user.records)
10
>>> user = bandicoot.read_csv('sample_records', 'samples', 'sample_places.csv')
>>> print len(user.antennas)
5
>>> user = bandicoot.read_csv('sample_records', '.', None, 'sample_attributes.csv')
>>> print user.attributes['age']
25