Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
Tesi
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
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Marco Aceti
Tesi
Commits
fce0db22
Verified
Commit
fce0db22
authored
May 10, 2023
by
Marco Aceti
Browse files
Options
Downloads
Patches
Plain Diff
Sort railway companies by train count in delay_boxplot
parent
7166411b
Branches
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#2840
passed
May 10, 2023
Stage: test
Stage: lint
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/analysis/stat.py
+4
-1
4 additions, 1 deletion
src/analysis/stat.py
with
4 additions
and
1 deletion
src/analysis/stat.py
+
4
−
1
View file @
fce0db22
...
@@ -64,9 +64,12 @@ def delay_boxplot(df: pd.DataFrame | DataFrameGroupBy) -> None:
...
@@ -64,9 +64,12 @@ def delay_boxplot(df: pd.DataFrame | DataFrameGroupBy) -> None:
group_melt
=
pd
.
DataFrame
()
group_melt
=
pd
.
DataFrame
()
grouped
:
list
=
list
(
df
)
# type: ignore
grouped
:
list
=
list
(
df
)
# type: ignore
if
grouped_by
==
"
weekday
"
:
# Re-order fields
# Re-order fields
if
grouped_by
==
"
weekday
"
:
grouped
.
sort
(
key
=
lambda
t
:
WEEKDAYS
[
t
[
0
]])
grouped
.
sort
(
key
=
lambda
t
:
WEEKDAYS
[
t
[
0
]])
elif
grouped_by
==
"
client_code
"
:
grouped
.
sort
(
key
=
lambda
g
:
len
(
g
[
1
]),
reverse
=
True
)
for
group
in
grouped
:
# type: ignore
for
group
in
grouped
:
# type: ignore
melt
=
pd
.
melt
(
melt
=
pd
.
melt
(
...
...
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