pandas-plots 0.11.13__py3-none-any.whl → 0.11.14__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
@@ -321,33 +321,34 @@ class OperatingSystem(Enum):
321
321
  MAC = auto()
322
322
 
323
323
 
324
- def get_os(desired_os: OperatingSystem = None, verbose: bool = False) -> bool | str:
324
+ def get_os(is_os: OperatingSystem = None, verbose: bool = False) -> bool | str:
325
325
  """
326
- A function that checks the operating system and returns a boolean value based on the desired operating system.
326
+ A function that checks the operating system and returns a boolean value based on the operating system to check.
327
327
 
328
328
  Parameters:
329
- desired_os (OperatingSystem): The desired operating system to check against. Defaults to None.
329
+ is_os (OperatingSystem): The operating system to check against. Defaults to None.
330
330
  Values are
331
331
  - OperatingSystem.WINDOWS
332
332
  - OperatingSystem.LINUX
333
333
  - OperatingSystem.MAC
334
334
 
335
335
  Returns:
336
- bool: True if the desired operating system matches the current operating system, False otherwise. Returns None if desired_os is None.
336
+ bool: True if the desired operating system matches the current operating system, False otherwise.
337
+ str: Returns the current operating system (platform.system()) if is_os is None.
337
338
  """
338
339
  if verbose:
339
340
  print(
340
341
  f"💻 os: {os.name} | 🎯 system: {platform.system()} | 💽 release: {platform.release()}"
341
342
  )
342
343
 
343
- if desired_os is None:
344
+ if is_os is None:
344
345
  return platform.system()
345
346
 
346
- if desired_os == OperatingSystem.WINDOWS and platform.system() == "Windows":
347
+ if is_os == OperatingSystem.WINDOWS and platform.system() == "Windows":
347
348
  return True
348
- elif desired_os == OperatingSystem.LINUX and platform.system() == "Linux":
349
+ elif is_os == OperatingSystem.LINUX and platform.system() == "Linux":
349
350
  return True
350
- elif desired_os == OperatingSystem.MAC and platform.system() == "Darwin":
351
+ elif is_os == OperatingSystem.MAC and platform.system() == "Darwin":
351
352
  return True
352
353
  else:
353
354
  return False
pandas_plots/tbl.py CHANGED
@@ -100,8 +100,6 @@ def describe_df(
100
100
  # print(f"🟣 shape: ({df.shape[0]:_}, {df.shape[1]}) columns: {df.columns.tolist()} ")
101
101
  print(f"🟣 duplicates: {df.duplicated().sum():_}")
102
102
  print(f"🟣 missings: {dict(df.isna().sum())}")
103
- print("--- column uniques (all)")
104
- print(f"🟠 index {wrap_text(df.index.tolist()[:top_n_uniques])}")
105
103
 
106
104
  def get_uniques_header(col: str):
107
105
  # * sorting has issues when col is of mixed type (object)
@@ -115,18 +113,17 @@ def describe_df(
115
113
  return unis, header
116
114
 
117
115
  # * show all columns
118
- for col in df.columns[:]:
119
- _u, _h = get_uniques_header(col)
120
- if use_columns:
116
+ if use_columns:
117
+ print("--- column uniques (all)")
118
+ print(f"🟠 index {wrap_text(df.index.tolist()[:top_n_uniques])}")
119
+ for col in df.columns[:]:
120
+ _u, _h = get_uniques_header(col)
121
121
  # * check col type
122
122
  is_str = df.loc[:, col].dtype.kind == "O"
123
123
  # * wrap output
124
124
  print(
125
125
  f"{_h} {wrap_text(_u[:top_n_uniques], max_items_in_line=70, use_apo=is_str)}"
126
126
  )
127
- # print(f"{_h} {_u[:top_n_uniques]}")
128
- else:
129
- print(f"{_h}")
130
127
 
131
128
  print("--- column stats (numeric)")
132
129
  # * only show numerics
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pandas-plots
3
- Version: 0.11.13
3
+ Version: 0.11.14
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
@@ -0,0 +1,10 @@
1
+ pandas_plots/hlp.py,sha256=wrvy36rnSdg1I4uQjIzzwGmjcN0gvSfKylRf_7GKpXs,12001
2
+ pandas_plots/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
3
+ pandas_plots/pls.py,sha256=BzZge7TnECjCs47MZ7P63_y2WU23P9sLaMl7SKB5h1Q,35043
4
+ pandas_plots/tbl.py,sha256=rVSW9RbM78gpWNDYnW0lt9xd1gceN6T57X7OuMtkaFg,24490
5
+ pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
+ pandas_plots-0.11.14.dist-info/LICENSE,sha256=6KQ5KVAAhRaB-JJKpX4cefKvRZRgI7GUPc92_2d31XY,1051
7
+ pandas_plots-0.11.14.dist-info/METADATA,sha256=pXKuQJIYm4Biu8kYs4RW5QRpEzCHgk0UI9rtDE2gAQ4,7011
8
+ pandas_plots-0.11.14.dist-info/WHEEL,sha256=GV9aMThwP_4oNCtvEC2ec3qUYutgWeAzklro_0m4WJQ,91
9
+ pandas_plots-0.11.14.dist-info/top_level.txt,sha256=XnaNuIHBqMmCeh_U7nKOYTwFue_SIA0wxuDgdPmnnSk,13
10
+ pandas_plots-0.11.14.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (74.1.2)
2
+ Generator: setuptools (75.1.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,10 +0,0 @@
1
- pandas_plots/hlp.py,sha256=E7Ehz4y-q-wd-5Vx0esI41xPzdY0IqqSNA9YMae0iUM,11985
2
- pandas_plots/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
3
- pandas_plots/pls.py,sha256=BzZge7TnECjCs47MZ7P63_y2WU23P9sLaMl7SKB5h1Q,35043
4
- pandas_plots/tbl.py,sha256=s6Fy6q9RVDzUV7pZfJZDcFu1jFf1MmEf6C322n3-kUg,24569
5
- pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
- pandas_plots-0.11.13.dist-info/LICENSE,sha256=6KQ5KVAAhRaB-JJKpX4cefKvRZRgI7GUPc92_2d31XY,1051
7
- pandas_plots-0.11.13.dist-info/METADATA,sha256=tKqiDpOguqk-JKQQaQsAgE4fYAIiEZBfiVTO18JV1tk,7011
8
- pandas_plots-0.11.13.dist-info/WHEEL,sha256=cVxcB9AmuTcXqmwrtPhNK88dr7IR_b6qagTj0UvIEbY,91
9
- pandas_plots-0.11.13.dist-info/top_level.txt,sha256=XnaNuIHBqMmCeh_U7nKOYTwFue_SIA0wxuDgdPmnnSk,13
10
- pandas_plots-0.11.13.dist-info/RECORD,,