Why does Python's zipfile create empty folders with no content?
Question:
I am working on a Google Colab notebook. I have downloaded datasets from Kaggle and it is in zip format. I have used Python’s zipfile
module but I don’t see it working. Looks like it just created empty folders but I don’t see contents in it. However, the original zip
does have content in it.
Answers:
In GoogleColab I always use
!unzip "test.zip"
you can use Linux commands by adding a "!" to the beginning of the cell, for more info visit examples
Update
unzip zip-file-name.zip -d /path/to/directory
I am working on a Google Colab notebook. I have downloaded datasets from Kaggle and it is in zip format. I have used Python’s zipfile
module but I don’t see it working. Looks like it just created empty folders but I don’t see contents in it. However, the original zip
does have content in it.
In GoogleColab I always use
!unzip "test.zip"
you can use Linux commands by adding a "!" to the beginning of the cell, for more info visit examples
Update
unzip zip-file-name.zip -d /path/to/directory