Skip to content

Commit

Permalink
Fixing CI errors 4
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarra Nebli committed Jan 25, 2025
1 parent 8c381c4 commit 040b3ce
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions janitor/functions/adorn.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,21 +41,18 @@ def tabyl(
>>> result = tabyl(df, "Category", "Subcategory", show_percentages=True,
... percentage_axis="row")
>>> print(result)
Subcategory X Y
Category
A 3 75.0% (3) 1 25.0% (1)
B 2 66.7% (2) 1 33.3% (1)
C 2 66.7% (2) 1 33.3% (1)
Total 7 70.0% (7) 3 30.0% (3)
Subcategory Category X Y
0 A 3.0 (75.00%) 1.0 (25.00%)
1 B 1.0 (33.33%) 2.0 (66.67%)
2 C 2.0 (66.67%) 1.0 (33.33%)
>>> result = tabyl(df, "Category", "Subcategory",
... show_percentages=True, percentage_axis="col")
>>> print(result)
Subcategory X Y
Category
A 3 42.9% (3) 1 25.0% (1)
B 2 28.6% (2) 1 25.0% (1)
C 2 28.6% (2) 1 25.0% (1)
Subcategory Category X Y
0 A 3.0 (42.86%) 1.0 (25.00%)
1 B 1.0 (14.29%) 2.0 (50.00%)
2 C 2.0 (28.57%) 1.0 (25.00%)
"""

Expand Down

0 comments on commit 040b3ce

Please sign in to comment.