Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
datascout
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
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
Code review analytics
Issue analytics
Insights
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
ABP Computing
ABP Computing Sandbox
datascout
Commits
6c08b2d2
Commit
6c08b2d2
authored
3 years ago
by
Guido Sterbini
Browse files
Options
Downloads
Patches
Plain Diff
Few typos
parent
1fb270e2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Pipeline
#2592215
failed
3 years ago
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
datascout/_datascout.py
+4
-3
4 additions, 3 deletions
datascout/_datascout.py
with
4 additions
and
3 deletions
datascout/_datascout.py
+
4
−
3
View file @
6c08b2d2
...
...
@@ -243,7 +243,7 @@ def pyarrow_to_dict(input_pa):
def
dict_to_pandas
(
input_dict
):
if
not
isinstance
(
input_dict
,
list
):
input_dict
=
[
input_dict
]
return
=
pd
.
DataFrame
(
input_dict
)
return
pd
.
DataFrame
(
input_dict
)
def
dict_to_awkward
(
input_dict
):
return
ak
.
from_arrow
(
dict_to_pyarrow
(
input_dict
))
...
...
@@ -262,7 +262,8 @@ def dict_to_json(input_dict, filename):
Function provided for convenience, but not of interest for typical use case...
'''
dict_to_pandas
(
input_dict
).
to_json
(
filename
+
'
.json
'
)
def
json_to_pandas
(
filename
)
def
json_to_pandas
(
filename
):
'''
Function provided for convenience, but not of interest for typical use case...
'''
...
...
@@ -278,7 +279,7 @@ def awkward_to_dict(input_awkward, row_index=0):
'''
it converts the specified row of an awkward array into a pyjapcscout-like dict
'''
return
=
convert_parrow_data
(
ak
.
to_arrow
(
input_awkward
)[
row_index
])
return
convert_parrow_data
(
ak
.
to_arrow
(
input_awkward
)[
row_index
])
def
pickle_to_dict
(
filename
):
with
open
(
filename
,
'
rb
'
)
as
handle
:
...
...
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