Skip to content

Commit 842cc18

Browse files
authored
Update README (#227)
Updates the README to have the instructions for `notebook_output_download` and `utility_script_install`.
1 parent 32517b8 commit 842cc18

File tree

1 file changed

+32
-4
lines changed

1 file changed

+32
-4
lines changed

README.md

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ Some examples include:
200200
```python
201201
import kagglehub
202202
from kagglehub import KaggleDatasetAdapter
203-
204203
# Load a Dataset with a specific version of a CSV, then remove a column
205204
dataset = kagglehub.dataset_load(
206205
KaggleDatasetAdapter.HUGGING_FACE,
@@ -241,7 +240,7 @@ kagglehub.dataset_download('bricevergnou/spotify-recommendation')
241240
# Download a specific version.
242241
kagglehub.dataset_download('bricevergnou/spotify-recommendation/versions/1')
243242

244-
# Download a single file
243+
# Download a single file.
245244
kagglehub.dataset_download('bricevergnou/spotify-recommendation', path='data.csv')
246245

247246
# Download a dataset or file, even if previously downloaded to cache.
@@ -259,7 +258,7 @@ import kagglehub
259258
# - https://www.kaggle.com/datasets/bricevergnou/spotify-recommendation
260259
#
261260
# You would use the following handle: `bricevergnou/spotify-recommendation`
262-
handle = '<KAGGLE_USERNAME>/<DATASET>
261+
handle = '<KAGGLE_USERNAME>/<DATASET>'
263262
local_dataset_dir = 'path/to/local/dataset/dir'
264263

265264
# Create a new dataset
@@ -285,13 +284,42 @@ import kagglehub
285284
# Download the latest version.
286285
kagglehub.competition_download('digit-recognizer')
287286

288-
# Download a single file
287+
# Download a single file.
289288
kagglehub.competition_download('digit-recognizer', path='train.csv')
290289

291290
# Download a competition or file, even if previously downloaded to cache.
292291
kagglehub.competition_download('digit-recognizer', force_download=True)
293292
```
294293

294+
### Download Notebook Outputs
295+
296+
The following examples download the `Titanic Tutorial` notebook output: https://www.kaggle.com/code/alexisbcook/titanic-tutorial
297+
298+
```python
299+
import kagglehub
300+
301+
# Download the latest version.
302+
kagglehub.notebook_output_download('alexisbcook/titanic-tutorial')
303+
304+
# Download a specific version of the notebook output.
305+
kagglehub.notebook_output_download('alexisbcook/titanic-tutorial/versions/1')
306+
307+
# Download a single file.
308+
kagglehub.notebok_output_download('alexisbcook/titanic-tutorial', path='submission.csv')
309+
```
310+
311+
### Install Utility Script
312+
313+
The following example installs the utility script `Physionet Challenge Utility Script` Utility Script: https://www.kaggle.com/code/bjoernjostein/physionet-challenge-utility-script. Using this command allows the code from this script to be available in your python environment.
314+
315+
```python
316+
import kagglehub
317+
318+
# Install the latest version.
319+
kagglehub.utility_script_install('bjoernjostein/physionet-challenge-utility-script')
320+
321+
```
322+
295323
## Development
296324

297325
### Prequisites

0 commit comments

Comments
 (0)