Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pyiricdata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bioinfo_iric
pyiricdata
Commits
55c790a3
Commit
55c790a3
authored
4 years ago
by
LouisGendron
Browse files
Options
Downloads
Plain Diff
Merge branch '10-get-dataset-id-by-dataset-name-and-search-datasets-names' into 'master'
Resolve "Get dataset id by dataset name and search datasets names" Closes
#10
See merge request
!9
parents
8c5ba6b3
61a0c3d0
Branches
11-dataset-operations
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!9
Resolve "Get dataset id by dataset name and search datasets names"
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyiricdata/Client.py
+8
-0
8 additions, 0 deletions
pyiricdata/Client.py
with
8 additions
and
0 deletions
pyiricdata/Client.py
+
8
−
0
View file @
55c790a3
...
...
@@ -123,6 +123,14 @@ class Client:
df
.
index
.
name
=
'
ID
'
return
df
"""
Get DatasetId by name
"""
def
get_dataset_id_by_name
(
self
,
name
):
return
self
.
datasets
.
loc
[
self
.
datasets
.
dataset_name
==
name
,
'
dataset_slug
'
][
0
]
"""
Get a subset of the available datasets for which name match a given term
"""
def
search_dataset_names
(
self
,
term
):
return
self
.
datasets
.
loc
[
self
.
datasets
.
dataset_name
.
str
.
contains
(
term
),:]
"""
Download file according to file_id
"""
def
dwnl_file_content
(
self
,
file_id
,
folder_out
=
''
,
filename
=
''
):
folder_out
=
folder_out
if
folder_out
and
folder_out
[
0
]
==
'
/
'
else
os
.
path
.
join
(
os
.
getcwd
(),
folder_out
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment