def _write_core_tables(options, module, core_results):
table_name = '<STR_LIT>'<EOL>single_file_path = os.path.join(options['<STR_LIT>'], table_name)<EOL>if module == '<STR_LIT>':  <EOL><INDENT>for i, core_result in enumerate(core_results):<EOL><INDENT>file_path = _get_file_path(i, options, table_name)<EOL>core_result[<NUM_LIT:1>].to_csv(file_path, index=False, float_format='<STR_LIT>')<EOL><DEDENT><DEDENT>elif type(core_results) == type(pd.DataFrame()):  <EOL><INDENT>core_results.to_csv(single_file_path, index=False, float_format='<STR_LIT>')<EOL><DEDENT>else:  <EOL><INDENT>df = pd.DataFrame({'<STR_LIT:y>': np.atleast_1d(core_results)})<EOL>df.to_csv(single_file_path, index=False, float_format='<STR_LIT>')<EOL><DEDENT>
Notes
-----
Depending on function that was called for analysis, core_results may be a
list of tuples (empirical), a dataframe, an array, or a single value.

For the list of tuples from empirical, the second element of each tuple is
the raw result, and we write them all with the appropriate prefix. For
dataframes, we write them. For arrays or single values, we convert to data
frames and write them.