google colaboratory - Load a Kaggle dataset into Colab notebook without extracting it - Stack Overflow

时间: 2025-01-06 admin 业界

When I run the following code, it downloads the zipped dataset, automatically extracts it after finishing the download, and delete the zip file.

import kagglehub
data_path = ""
path = kagglehub.dataset_download(file)

print("Path to dataset files:", path)

Is there any way to only download it in the zip form without extracting it?