Esempio n. 1
0
def main(base_dir):
    reader = SeriesReader(os.path.join(base_dir, "tutorial_datatype_01.xls"))
    print(to_dict(reader))
    #{u'userid': [10120.0, 10121.0, 10122.0], u'name': [u'Adam', u'Bella', u'Cedar']}
    formatter = ColumnFormatter(0, str)
    reader.add_formatter(formatter)
    to_dict(reader)
Esempio n. 2
0
def main(base_dir):
    reader = SeriesReader(os.path.join(base_dir, "tutorial_datatype_01.xls"))
    print(to_dict(reader))
    #{u'userid': [10120.0, 10121.0, 10122.0], u'name': [u'Adam', u'Bella', u'Cedar']}
    formatter = ColumnFormatter(0, str)
    reader.add_formatter(formatter)
    to_dict(reader)
Esempio n. 3
0
from pyexcel import SeriesReader
from pyexcel.utils import to_dict
from pyexcel.formatters import ColumnFormatter
from pyexcel.formatters import STRING_FORMAT

reader = SeriesReader("tutorial_datatype_01.xls")
print to_dict(reader)
#{u'userid': [10120.0, 10121.0, 10122.0], u'name': [u'Adam', u'Bella', u'Cedar']}
formatter = ColumnFormatter(0, STRING_FORMAT)
reader.add_formatter(formatter)
to_dict(reader)
#{u'userid': ['10120.0', '10121.0', '10122.0'], u'name': [u'Adam', u'Bella', u'Cedar']}
Esempio n. 4
0
from pyexcel import SeriesReader
from pyexcel.utils import to_dict
from pyexcel.formatters import ColumnFormatter
from pyexcel.formatters import STRING_FORMAT


reader = SeriesReader("tutorial_datatype_01.xls")
print to_dict(reader)
#{u'userid': [10120.0, 10121.0, 10122.0], u'name': [u'Adam', u'Bella', u'Cedar']}
formatter = ColumnFormatter(0, STRING_FORMAT)
reader.add_formatter(formatter)
to_dict(reader)
#{u'userid': ['10120.0', '10121.0', '10122.0'], u'name': [u'Adam', u'Bella', u'Cedar']}