Issue
Can you upload entire folders in IPython Jupyter? If so, how? I know how to upload individual files, of course, but this can get tedious if there are a large number of files and/or subdirectories.
Solution
Convert it into a single Zip file and upload that. to unzip the folder use the code down bellow
import zipfile as zf
files = zf.ZipFile("ZippedFolder.zip", 'r')
files.extractall('directory to extract')
files.close()
However, sometimes you may need to download several files from notebook. There are several ways to do this but the easiest way is to zip a directory and download the zip file:
import shutil
shutil.make_archive(output_filename_dont_add_.zip, 'zip', directory_to_download)
Answered By - Afshin Amiri
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.