pandas-plots 0.9.8__tar.gz → 0.9.9__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pandas-plots
3
- Version: 0.9.8
3
+ Version: 0.9.9
4
4
  Summary: A collection of helper for table handling and vizualization
5
5
  Home-page: https://github.com/smeisegeier/pandas-plots
6
6
  Author: smeisegeier
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = pandas-plots
3
- version = 0.9.8
3
+ version = 0.9.9
4
4
  author = smeisegeier
5
5
  author_email = dexterDSDo@googlemail.com
6
6
  description = A collection of helper for table handling and vizualization
@@ -326,6 +326,7 @@ def show_num_df(
326
326
  df,
327
327
  total_mode: TOTAL_LITERAL = "sum",
328
328
  total_axis: Literal["x", "y", "xy", None] = "xy",
329
+ total_exclude: bool = False,
329
330
  heatmap_axis: Literal["x", "y", "xy", None] = None,
330
331
  data_bar_axis: Literal["x", "y", "xy", None] = None,
331
332
  pct_axis: Literal["x", "xy", None] = None,
@@ -343,7 +344,7 @@ def show_num_df(
343
344
  - df: the DataFrame to display
344
345
  - total_mode: a Literal indicating the mode for aggregating totals ["sum", "mean", "median", "min", "max", "std", "var", "skew", "kurt"]
345
346
  - total_axis (Literal["x", "y", "xy", None], optional): The axis for displaying totals. Defaults to "xy".
346
-
347
+ - total_exclude (bool, optional): Whether to exclude totals from the coloring in heatmap and data bar. Defaults to False.
347
348
  - heatmap_axis (Literal["x","y","xy", None], optional): The axis for displaying heatmaps. Defaults to None.
348
349
  - data_bar_axis: a Literal indicating the axis for applying data bar coloring ["x","y","xy", None]
349
350
  - pct_axis: a Literal indicating the directions for displaying percentages ["x","xy", None]. "x" means sum up pct per column
@@ -443,6 +444,8 @@ def show_num_df(
443
444
  color=f"{color_highlight}",
444
445
  axis=0 if data_bar_axis == "x" else 1 if data_bar_axis == "y" else None,
445
446
  width=100,
447
+ # * apply subset if total_exclude
448
+ subset=(df_orig.index, df_orig.columns) if total_exclude else None,
446
449
  # align="zero",
447
450
  )
448
451
 
@@ -592,6 +595,7 @@ def show_num_df(
592
595
  out.background_gradient(
593
596
  cmap=cmap_heat,
594
597
  axis=None if heatmap_axis == "xy" else 0 if heatmap_axis == "y" else 1,
598
+ subset=(df_orig.index, df_orig.columns) if total_exclude else None,
595
599
  )
596
600
 
597
601
  return out
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pandas-plots
3
- Version: 0.9.8
3
+ Version: 0.9.9
4
4
  Summary: A collection of helper for table handling and vizualization
5
5
  Home-page: https://github.com/smeisegeier/pandas-plots
6
6
  Author: smeisegeier
File without changes
File without changes