request.fetch
¶
Request copies of relational datasets.
fetch(name, version=None)
¶
Get a dataset with a name/version. Return path to a zipfile.
Something else.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
Dataset name, usually lowercase with underscores. |
required |
version |
Optional[str]
|
Dataset version. Downloads a default ( |
None
|
Returns:
Type | Description |
---|---|
str
|
A string representing the path to the downloaded dataset. For example: |
str
|
```python |
str
|
'/home/user/relational_datasets/toy_cancer_v0.0.3.zip' |
str
|
``` |
str
|
The path is converted to a string from a |
str
|
work cross-platform. |
Raises:
Type | Description |
---|---|
urllib.error.URLError
|
If the data is not in the cache and cannot be downloaded, a failed request will raise this exception. |
Examples:
Fetch toy_cancer
dataset, version v0.0.3
:
from relational_datasets import fetch
fetch('toy_cancer', 'v0.0.3')
# '/home/user/relational_datasets/toy_cancer_v0.0.3.zip'
Source code in relational_datasets/request.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 |
|
Last update:
June 20, 2022