jsonextended.parsers.csvs_literal module¶
-
class
jsonextended.parsers.csvs_literal.
CSVLiteral_Parser
[source]¶ Bases:
object
Examples
>>> from pprint import pprint
>>> from jsonextended.utils import MockPath >>> fileobj = MockPath(is_file=True, ... content='''# comment line ... head1,head2 ... 1.1,3 ... 2.2,"3.3"''' ... ) >>> with fileobj.open() as f: ... data = CSVLiteral_Parser().read_file(f) >>> pprint(data) {'head1': [1.1, 2.2], 'head2': [3, '3.3']}
-
file_regex
= '*.literal.csv'¶
-
plugin_descript
= 'read *.literal.csv delimited files with headers to {header:column_values}, with number strings converted to int/float'¶ , s.t. values are converted to their python type
-
plugin_name
= 'csv.literal'¶
-