def import_source(self, sheet, source, delimiter="<STR_LIT:U+002C>"):
<EOL>if '<STR_LIT:U+0020>' in sheet:<EOL><INDENT>raise RuntimeError("<STR_LIT>" % sheet)<EOL><DEDENT>if not source.endswith("<STR_LIT>") and not source.endswith("<STR_LIT>"):<EOL><INDENT>raise RuntimeError("<STR_LIT>" % source)<EOL><DEDENT>self.source_sheet = sheet<EOL>source_data = np.loadtxt(source, dtype=str, delimiter=delimiter)<EOL>self.source_data = {"<STR_LIT:title>": source_data[<NUM_LIT:0>].tolist(),<EOL>"<STR_LIT:data>": source_data[<NUM_LIT:1>:]}<EOL>cell_format_title = self.workbook.add_format({'<STR_LIT>': True,<EOL>'<STR_LIT>': u'<STR_LIT>',<EOL>'<STR_LIT>': '<STR_LIT>',<EOL>'<STR_LIT>': <NUM_LIT>})<EOL>cell_format = self.workbook.add_format({'<STR_LIT>': False,<EOL>'<STR_LIT>': u'<STR_LIT>',<EOL>'<STR_LIT>': <NUM_LIT:0>})<EOL>worksheet = self.workbook.add_worksheet(sheet)<EOL>worksheet.write_row('<STR_LIT>', self.source_data['<STR_LIT:title>'], cell_format_title)<EOL>_, col_num = self.source_data['<STR_LIT:data>'].shape<EOL>for i in range(col_num):<EOL><INDENT>try:<EOL><INDENT>data_array = self.source_data['<STR_LIT:data>'][:, i].astype(float)<EOL><DEDENT>except ValueError:<EOL><INDENT>data_array = self.source_data['<STR_LIT:data>'][:, i]<EOL><DEDENT>worksheet.write_column(<NUM_LIT:1>, i, data_array.tolist(), cell_format)<EOL><DEDENT>
Function:
    Save original data into specific sheet, and try to translate data to float type
Input:
    sheet: Must be a non exists sheet
    source: File path of source