def default_zip_file(df, df2):<EOL>
with io.BytesIO() as memory_file:<EOL><INDENT>with zipfile.ZipFile(memory_file, mode='<STR_LIT:w>') as zfile:<EOL><INDENT>tmp = tempfile.NamedTemporaryFile()<EOL>with open(tmp.name, mode='<STR_LIT:wb>'):<EOL><INDENT>joblib.dump(df, tmp.name)<EOL><DEDENT>with open(tmp.name, mode='<STR_LIT:rb>') as f:<EOL><INDENT>content = f.read()<EOL>zfile.writestr('<STR_LIT>', content)<EOL><DEDENT>tmp.close()<EOL>tmp2 = tempfile.NamedTemporaryFile()<EOL>with open(tmp2.name, mode='<STR_LIT:wb>'):<EOL><INDENT>joblib.dump(df2, tmp2.name)<EOL><DEDENT>with open(tmp2.name, mode='<STR_LIT:rb>') as f:<EOL><INDENT>content = f.read()<EOL>zfile.writestr('<STR_LIT>', content)<EOL><DEDENT>tmp2.close()<EOL><DEDENT>memory_file.seek(<NUM_LIT:0>)<EOL>return memory_file.getvalue()<EOL><DEDENT>
Return zip file with two DF saved using joblib.