Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
pymoondb
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
Container registry
Model registry
Operate
Environments
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
Alessandro Frigeri
pymoondb
Commits
95187e25
Commit
95187e25
authored
3 years ago
by
Alessandro Frigeri
Browse files
Options
Downloads
Patches
Plain Diff
updated makefile
parent
2cf6d346
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Makefile
+3
-0
3 additions, 0 deletions
Makefile
moondb/core.py
+35
-1
35 additions, 1 deletion
moondb/core.py
with
38 additions
and
1 deletion
Makefile
+
3
−
0
View file @
95187e25
...
@@ -20,3 +20,6 @@ help:
...
@@ -20,3 +20,6 @@ help:
bdist
:
bdist
:
python3 setup.py sdist bdist_wheel
python3 setup.py sdist bdist_wheel
dev
:
python setup.py develop
This diff is collapsed.
Click to expand it.
moondb/core.py
100644 → 100755
+
35
−
1
View file @
95187e25
#!/usr/bin/python3
#!/usr/bin/python3
#
#
# (c) 2019 Alessandro Frigeri, Istituto Nazionale di Astrofisica
# (c) 2019
-2022
Alessandro Frigeri, Istituto Nazionale di Astrofisica
#
#
# pymoondb: MoonDB Python module
# pymoondb: MoonDB Python module
...
@@ -393,6 +393,40 @@ class AnalysisFilter:
...
@@ -393,6 +393,40 @@ class AnalysisFilter:
res_list
.
append
(
analysis
)
res_list
.
append
(
analysis
)
return
res_list
return
res_list
def
get_results_as_dataframe
(
self
):
"""
A method
'
s docstring with parameters and return value.
Use all the cool Sphinx capabilities in this description, e.g. to give
usage examples ...
:Example:
>>>
another_class
.
foo
(
''
,
AClass
())
:
param
arg1
:
first
argument
:
type
arg1
:
string
:
param
arg2
:
second
argument
:
type
arg2
:
:
class
:
`module.AClass`
:
return
:
something
:
rtype
:
string
:
raises
:
TypeError
"""
resp
=
requests
.
get
(
_url
(
'
/data/
'
+
self
.
_toJSON
()
))
res_list
=
[]
for
r
in
resp
.
json
()[
'
results
'
]:
rd
=
dict
(
r
)
analysis
=
namedtuple
(
"
Analysis
"
,
rd
.
keys
())(
*
rd
.
values
())
data_res_list
=
[]
for
r
in
analysis
.
dataResults
:
data_res
=
namedtuple
(
"
dataResult
"
,
r
.
keys
())(
*
r
.
values
())
data_res_list
.
append
(
data_res
)
analysis
=
analysis
.
_replace
(
dataResults
=
data_res_list
)
df
=
pd
.
DataFrame
(
data
=
analysis
)
res_list
.
append
(
df
)
return
res_list
if
__name__
==
"
__main__
"
:
if
__name__
==
"
__main__
"
:
m
=
get_missions
()
m
=
get_missions
()
...
...
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