writer Package¶
writer
Package¶
utils
Module¶
-
txt2xls.writer.utils.
ensure_iterable
(axis)[source]¶ Ensure the axis is iterable (XY array)
>>> axis1 = [ ... [0, 1, 2], ... [3, 4, 5], ... [6, 7, 8], ... ] >>> assert axis1 == ensure_iterable(axis1) >>> axis21 = [0, 1, 2] >>> axis22 = [[0], [1], [2]] >>> assert axis22 == ensure_iterable(axis21)
-
txt2xls.writer.utils.
get_sheet_name
(filename)[source]¶ Return extension and parent directory stripped filename which is used as a sheet name
Parameters: filename (string) – A file path Returns: A extension and parent directory stripped filename Return type: filename Examples
>>> get_sheet_name('./foo/bar/hogehoge.piyo') 'hogehoge' >>> len(get_sheet_name("*"*100)) 31