本文整理汇总了Python中pyexcel_io.load_data函数的典型用法代码示例。如果您正苦于以下问题:Python load_data函数的具体用法?Python load_data怎么用?Python load_data使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了load_data函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: get_data
def get_data(self):
if self.file_stream is not None:
sheets = load_data(self.file_stream,
file_type=self.file_type,
**self.keywords)
else:
sheets = load_data(self.file_content,
file_type=self.file_type,
**self.keywords)
return one_sheet_tuple(sheets.items())
示例2: get_data
def get_data(self):
f = request.urlopen(self.url)
info = f.info()
if PY2:
mime_type = info.type
else:
mime_type = info.get_content_type()
file_type = FILE_TYPE_MIME_TABLE.get(mime_type, None)
if file_type is None:
file_type = get_file_type_from_url(self.url)
content = f.read()
sheets = load_data(content, file_type=file_type, **self.keywords)
return sheets, KEYWORD_URL, None
示例3: get_sql_book
def get_sql_book(self):
return load_data(DB_SQL,
session=self.session,
tables=[self.table])
示例4: get_data
def get_data(self):
sheets = load_data(DB_DJANGO, models=self.models)
return sheets, DB_DJANGO, None
示例5: get_data
def get_data(self):
sheets = load_data(self.file_name, **self.keywords)
path, filename_alone = os.path.split(self.file_name)
return sheets, filename_alone, path
示例6: test_none_type_load_data
def test_none_type_load_data():
load_data(None)
示例7: test_load_csvz_data_from_memory
def test_load_csvz_data_from_memory():
if not PY2:
io = StringIO()
load_data(io, file_type="csvz")
else:
raise IOError("pass it")
示例8: test_load_unknown_data_from_memory
def test_load_unknown_data_from_memory():
io = BytesIO()
load_data(io, file_type="unknown")
示例9: test_load_unknown_data
def test_load_unknown_data():
load_data("test.unknown")
示例10: test_load_ods_data_from_memory
def test_load_ods_data_from_memory():
io = BytesIO()
load_data(io, file_type="ods")
示例11: test_load_ods_data
def test_load_ods_data():
load_data("test.ods")
示例12: test_wrong_parameter_to_load_data
def test_wrong_parameter_to_load_data():
load_data(1)