Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Open-Data-Examples
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
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Open-Data
Open-Data-Examples
Commits
cc1b9bd4
Commit
cc1b9bd4
authored
5 months ago
by
root
Browse files
Options
Downloads
Patches
Plain Diff
Added Screenshot of output for example 10
parent
9f994d7f
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
10_Redispatch/example10.py
+1
-1
1 addition, 1 deletion
10_Redispatch/example10.py
10_Redispatch/output_table.png
+0
-0
0 additions, 0 deletions
10_Redispatch/output_table.png
with
1 addition
and
1 deletion
10_Redispatch/example10.py
+
1
−
1
View file @
cc1b9bd4
...
@@ -14,7 +14,7 @@ total_bottleneck_minutes = df["totalBottleneckMinutes"].sum()
...
@@ -14,7 +14,7 @@ total_bottleneck_minutes = df["totalBottleneckMinutes"].sum()
print
(
"
Total amount of bottleneck minutes over all communes:
"
,
total_bottleneck_minutes
)
print
(
"
Total amount of bottleneck minutes over all communes:
"
,
total_bottleneck_minutes
)
# Get the relative amount of Bottleneck minutes compared to the total amount
# Get the relative amount of Bottleneck minutes compared to the total amount
df
[
"
relativeBottleneck
Minutes
"
]
=
df
[
"
totalBottleneckMinutes
"
]
/
total_bottleneck_minutes
df
[
"
relativeBottleneck
ToTotal
"
]
=
df
[
"
totalBottleneckMinutes
"
]
/
total_bottleneck_minutes
# output the top ten highest bottlenecks
# output the top ten highest bottlenecks
df_top_ten
=
df
.
sort_values
(
"
totalBottleneckMinutes
"
,
ascending
=
False
,
ignore_index
=
True
).
take
(
range
(
10
))
df_top_ten
=
df
.
sort_values
(
"
totalBottleneckMinutes
"
,
ascending
=
False
,
ignore_index
=
True
).
take
(
range
(
10
))
...
...
This diff is collapsed.
Click to expand it.
10_Redispatch/output_table.png
0 → 100644
+
0
−
0
View file @
cc1b9bd4
16.1 KiB
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