Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Aug 15, 2024
1 parent 5f9f5d0 commit a2ba0ce
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions inequality/pen.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@


def pen(
df, col, x, weight=None, ascending=True, xticks=True, total_bars=100,
figsize=(8, 6)
df, col, x, weight=None, ascending=True, xticks=True, total_bars=100, figsize=(8, 6)
):
"""
Creates the Pen's Parade visualization.
Expand Down Expand Up @@ -97,9 +96,7 @@ def pen(
return fig

Check warning on line 96 in inequality/pen.py

View check run for this annotation

Codecov / codecov/patch

inequality/pen.py#L95-L96

Added lines #L95 - L96 were not covered by tests
else:
df["NumBars"] = (

Check warning on line 98 in inequality/pen.py

View check run for this annotation

Codecov / codecov/patch

inequality/pen.py#L98

Added line #L98 was not covered by tests
(df[weight] / df[weight].sum() * total_bars)
.apply(math.ceil)
.astype(int)
(df[weight] / df[weight].sum() * total_bars).apply(math.ceil).astype(int)
)

repeated_rows = []
Expand Down Expand Up @@ -172,8 +169,17 @@ def pen(


def pengram(
gdf, col, name, figsize=(8, 6), k=5, scheme="quantiles", xticks=True,
leg_pos="lower right", orientation="r", fmt="{:.2f}", ratio=(3, 1),
gdf,
col,
name,
figsize=(8, 6),
k=5,
scheme="quantiles",
xticks=True,
leg_pos="lower right",
orientation="r",
fmt="{:.2f}",
ratio=(3, 1),
query=None,
):
"""
Expand Down

0 comments on commit a2ba0ce

Please sign in to comment.