Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
kl_task5
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
arun.uday
kl_task5
Commits
5ad85be7
Commit
5ad85be7
authored
Jan 23, 2023
by
arun.uday
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
93386271
70f50136
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
scripts/core/handlers/pivoted_data_frames.py
+1
-1
scripts/services/access_operations.py
+3
-3
scripts/services/app_class_operations.py
+2
-2
No files found.
scripts/core/handlers/pivoted_data_frames.py
View file @
5ad85be7
...
...
@@ -20,4 +20,4 @@ def pivot_frame(file):
body_vals
=
{
"body"
:
pivoted_d
.
to_dict
(
orient
=
"records"
)}
dict_new
=
{
**
head_cols
,
**
body_vals
}
return
dict_new
return
dict_new
,
pivoted_d
scripts/services/access_operations.py
View file @
5ad85be7
...
...
@@ -17,15 +17,15 @@ def access_op():
json_pandas
.
create_json
(
path_time
,
time_changed
)
print
(
"Pivoting the dataframe"
)
pivot_change
=
json_pandas
.
pivot_data
(
file_concat
)
dict_data_pivoted
,
pivot_change
=
json_pandas
.
pivot_data
(
file_concat
)
json_pandas
.
create_json
(
path_pivot
,
pivot_change
)
print
(
"Melting the dataframe"
)
melt_change
=
json_pandas
.
melt_data
(
file_concat
)
melt_change
=
json_pandas
.
melt_data
(
dict_data_pivoted
)
json_pandas
.
create_json
(
path_melt
,
melt_change
)
print
(
"Merging the dataframe"
)
merge_change
=
json_pandas
.
merge_data
(
file_concat
)
merge_change
=
json_pandas
.
merge_data
(
dict_data_pivoted
)
json_pandas
.
create_json
(
path_merge
,
merge_change
)
except
Exception
as
e
:
...
...
scripts/services/app_class_operations.py
View file @
5ad85be7
...
...
@@ -53,11 +53,11 @@ class JsonPandas:
@staticmethod
def
pivot_data
(
file
):
try
:
data_pivoted
=
pivot_frame
(
file
)
d
ict_data_pivoted
,
d
ata_pivoted
=
pivot_frame
(
file
)
except
Exception
as
e
:
print
(
f
'{exception_msg}{e}'
)
else
:
return
data_pivoted
return
d
ict_data_pivoted
,
d
ata_pivoted
# using the melt function
@staticmethod
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment