pandas-plots 0.12.10__py3-none-any.whl → 0.12.12__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.
pandas_plots/hlp.py CHANGED
@@ -467,3 +467,27 @@ def add_bitmask_label(
467
467
  # * extend objects to enable chaining
468
468
  pd.DataFrame.add_bitmask_label = add_bitmask_label
469
469
  ddb.DuckDBPyRelation.add_bitmask_label = add_bitmask_label
470
+
471
+
472
+ def find_cols(all_cols: list[str], stubs=list[str]):
473
+ """
474
+ Find all columns in a list of columns that contain any of the given stubs.
475
+
476
+ Parameters
477
+ ----------
478
+ all_cols : list[str]
479
+ List of columns to search in.
480
+ stubs : list[str]
481
+ List of strings to search for in column names.
482
+
483
+ Returns
484
+ -------
485
+ list[str]
486
+ List of columns that contain any of the given stubs.
487
+ """
488
+ if all_cols is None or not stubs:
489
+ return "❌ empty lists"
490
+ return [col for col in all_cols if any(match in col for match in stubs)]
491
+
492
+ # * extend objects to enable chaining
493
+ # pd.DataFrame.find_cols = find_cols
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: pandas-plots
3
- Version: 0.12.10
3
+ Version: 0.12.12
4
4
  Summary: A collection of helper for table handling and visualization
5
5
  Home-page: https://github.com/smeisegeier/pandas-plots
6
6
  Author: smeisegeier
@@ -114,6 +114,7 @@ tbl.show_num_df(
114
114
  - `show_package_version` prints version of a list of packages
115
115
  - `get_os` helps to identify and ensure operating system at runtime
116
116
  - `add_bitmask_label()` adds a column to the data that resolves a bitmask column into human-readable labels
117
+ - `find_cols()` finds all columns in a list of columns that contain any of the given stubs
117
118
  <br>
118
119
 
119
120
  - `pii` has routines for handling of personally identifiable information
@@ -0,0 +1,11 @@
1
+ pandas_plots/hlp.py,sha256=CRj8vqQRxcT7XDdLZ0b3ESNyuUiqUJvGIj9EtC-K4Y8,17232
2
+ pandas_plots/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
3
+ pandas_plots/pls.py,sha256=au4ykzTIEmcMEfRTUqEZlXotiXFfkQx19Q0VjSwBJqI,47401
4
+ pandas_plots/tbl.py,sha256=tuTDRFaD4lKQ2fMeMCJwnJL65zXuUGVQ6uwQNVa0y6Q,31883
5
+ pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
+ pandas_plots-0.12.12.dist-info/LICENSE,sha256=6KQ5KVAAhRaB-JJKpX4cefKvRZRgI7GUPc92_2d31XY,1051
7
+ pandas_plots-0.12.12.dist-info/METADATA,sha256=lZSmZkE4fGmhkertw_Ts1imCS22LmcbSHVoGvTqJtCw,7442
8
+ pandas_plots-0.12.12.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
+ pandas_plots-0.12.12.dist-info/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
10
+ pandas_plots-0.12.12.dist-info/top_level.txt,sha256=XnaNuIHBqMmCeh_U7nKOYTwFue_SIA0wxuDgdPmnnSk,13
11
+ pandas_plots-0.12.12.dist-info/RECORD,,
@@ -1,11 +0,0 @@
1
- pandas_plots/hlp.py,sha256=N6NrbFagVMMX-ZnV0rIBEz82SeSoOkksfMcCap55W7E,16588
2
- pandas_plots/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
3
- pandas_plots/pls.py,sha256=au4ykzTIEmcMEfRTUqEZlXotiXFfkQx19Q0VjSwBJqI,47401
4
- pandas_plots/tbl.py,sha256=tuTDRFaD4lKQ2fMeMCJwnJL65zXuUGVQ6uwQNVa0y6Q,31883
5
- pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
- pandas_plots-0.12.10.dist-info/LICENSE,sha256=6KQ5KVAAhRaB-JJKpX4cefKvRZRgI7GUPc92_2d31XY,1051
7
- pandas_plots-0.12.10.dist-info/METADATA,sha256=OeNnF6SP24F2tuxHGY2AsP0bmXGsF9E0NifH8ryE818,7349
8
- pandas_plots-0.12.10.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
9
- pandas_plots-0.12.10.dist-info/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
10
- pandas_plots-0.12.10.dist-info/top_level.txt,sha256=XnaNuIHBqMmCeh_U7nKOYTwFue_SIA0wxuDgdPmnnSk,13
11
- pandas_plots-0.12.10.dist-info/RECORD,,