rgwfuncs 0.0.20__py3-none-any.whl → 0.0.21__py3-none-any.whl

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.
rgwfuncs/df_lib.py CHANGED
@@ -1681,7 +1681,7 @@ def print_n_frequency_linear(df: pd.DataFrame, n: int, columns: list, order_by:
1681
1681
  df: DataFrame to analyze.
1682
1682
  n: Number of top values to print.
1683
1683
  columns: List of column names to analyze.
1684
- order_by: Order of frequency: ASC, DESC, FREQ_ASC, FREQ_DESC.
1684
+ order_by: Order of frequency: ASC, DESC, FREQ_ASC, FREQ_DESC, BY_KEYS_ASC, BY_KEYS_DESC.
1685
1685
  """
1686
1686
 
1687
1687
  def generate_linear_report(df, columns, limit, order_by):
@@ -1720,6 +1720,10 @@ def print_n_frequency_linear(df: pd.DataFrame, n: int, columns: list, order_by:
1720
1720
  reverse=True))
1721
1721
  elif order_by == "FREQ_ASC":
1722
1722
  return dict(sorted(frequency.items(), key=lambda item: item[1]))
1723
+ elif order_by == "BY_KEYS_ASC":
1724
+ return dict(sorted(frequency.items()))
1725
+ elif order_by == "BY_KEYS_DESC":
1726
+ return dict(sorted(frequency.items(), reverse=True))
1723
1727
  else: # Default to "FREQ_DESC"
1724
1728
  return dict(
1725
1729
  sorted(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: rgwfuncs
3
- Version: 0.0.20
3
+ Version: 0.0.21
4
4
  Summary: A functional programming paradigm for mathematical modelling and data science
5
5
  Home-page: https://github.com/ryangerardwilson/rgwfunc
6
6
  Author: Ryan Gerard Wilson
@@ -0,0 +1,9 @@
1
+ rgwfuncs/__init__.py,sha256=2nrp3c5VmVrKh0Ih6zELL8niH9nAHN0XnObqe-EpxlE,1169
2
+ rgwfuncs/df_lib.py,sha256=URN-ChKH7JUGcKeLVURGf5RrZS8psCWs5w7dkbtKmCk,67252
3
+ rgwfuncs/str_lib.py,sha256=I5B0WOGaLUGaedMG7hqiKnIqV7Jc9h1RYlgOiC_-iGY,3678
4
+ rgwfuncs-0.0.21.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
5
+ rgwfuncs-0.0.21.dist-info/METADATA,sha256=P0BVo_B-RPIjFzEGApdjjBTNuyE3wtiKgjhcrB35yPE,34680
6
+ rgwfuncs-0.0.21.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
7
+ rgwfuncs-0.0.21.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
8
+ rgwfuncs-0.0.21.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
9
+ rgwfuncs-0.0.21.dist-info/RECORD,,
@@ -1,9 +0,0 @@
1
- rgwfuncs/__init__.py,sha256=2nrp3c5VmVrKh0Ih6zELL8niH9nAHN0XnObqe-EpxlE,1169
2
- rgwfuncs/df_lib.py,sha256=3iWQ-iqKbgCLJsMc5DdnxrZ3sSEMDNZNyOsU6pJy060,67028
3
- rgwfuncs/str_lib.py,sha256=I5B0WOGaLUGaedMG7hqiKnIqV7Jc9h1RYlgOiC_-iGY,3678
4
- rgwfuncs-0.0.20.dist-info/LICENSE,sha256=7EI8xVBu6h_7_JlVw-yPhhOZlpY9hP8wal7kHtqKT_E,1074
5
- rgwfuncs-0.0.20.dist-info/METADATA,sha256=S1_hL1vNpRPV1uc9RIFatPKoR-e3LhZRysNKCjIM_T0,34680
6
- rgwfuncs-0.0.20.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
7
- rgwfuncs-0.0.20.dist-info/entry_points.txt,sha256=j-c5IOPIQ0252EaOV6j6STio56sbXl2C4ym_fQ0lXx0,43
8
- rgwfuncs-0.0.20.dist-info/top_level.txt,sha256=aGuVIzWsKiV1f2gCb6mynx0zx5ma0B1EwPGFKVEMTi4,9
9
- rgwfuncs-0.0.20.dist-info/RECORD,,