pandas-plots 0.11.11__tar.gz → 0.11.13__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.
- {pandas_plots-0.11.11/src/pandas_plots.egg-info → pandas_plots-0.11.13}/PKG-INFO +5 -1
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/README.md +1 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/setup.cfg +4 -1
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots/hlp.py +8 -6
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots/tbl.py +13 -6
- {pandas_plots-0.11.11 → pandas_plots-0.11.13/src/pandas_plots.egg-info}/PKG-INFO +5 -1
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots.egg-info/requires.txt +3 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/LICENSE +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/pyproject.toml +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots/pii.py +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots/pls.py +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots/ven.py +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots.egg-info/SOURCES.txt +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots.egg-info/dependency_links.txt +0 -0
- {pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pandas-plots
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.13
|
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
|
@@ -28,6 +28,9 @@ Requires-Dist: Jinja2>=3.1.4
|
|
28
28
|
Requires-Dist: requests>=2.32.0
|
29
29
|
Requires-Dist: numpy<2.0.0
|
30
30
|
Requires-Dist: missingno>=0.5.2
|
31
|
+
Requires-Dist: duckdb>=1.0.0
|
32
|
+
Requires-Dist: kaleido>=0.2.1
|
33
|
+
Requires-Dist: nbformat>=4.2.0
|
31
34
|
|
32
35
|
# pandas-plots
|
33
36
|
|
@@ -78,6 +81,7 @@ tbl.show_num_df(
|
|
78
81
|
- `tbl` utilities for table descriptions
|
79
82
|
- 🌟`show_num_df()` displays a table as styled version with additional information
|
80
83
|
- `describe_df()` an alternative version of pandas `describe()` function
|
84
|
+
- `descr_db()` a very short descr for a `duckdb` relation
|
81
85
|
- `pivot_df()` gets a pivot table of a 3 column dataframe (or 2 columns if no weights are given)
|
82
86
|
|
83
87
|
- `pls` for plotly visualizations
|
@@ -47,6 +47,7 @@ tbl.show_num_df(
|
|
47
47
|
- `tbl` utilities for table descriptions
|
48
48
|
- 🌟`show_num_df()` displays a table as styled version with additional information
|
49
49
|
- `describe_df()` an alternative version of pandas `describe()` function
|
50
|
+
- `descr_db()` a very short descr for a `duckdb` relation
|
50
51
|
- `pivot_df()` gets a pivot table of a 3 column dataframe (or 2 columns if no weights are given)
|
51
52
|
|
52
53
|
- `pls` for plotly visualizations
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[metadata]
|
2
2
|
name = pandas-plots
|
3
|
-
version = 0.11.
|
3
|
+
version = 0.11.13
|
4
4
|
author = smeisegeier
|
5
5
|
author_email = dexterDSDo@googlemail.com
|
6
6
|
description = A collection of helper for table handling and vizualization
|
@@ -34,6 +34,9 @@ install_requires =
|
|
34
34
|
requests >= 2.32.0
|
35
35
|
numpy < 2.0.0
|
36
36
|
missingno >= 0.5.2
|
37
|
+
duckdb >= 1.0.0
|
38
|
+
kaleido >= 0.2.1
|
39
|
+
nbformat >= 4.2.0
|
37
40
|
|
38
41
|
[egg_info]
|
39
42
|
tag_build =
|
@@ -311,7 +311,8 @@ def show_package_version(
|
|
311
311
|
items.append(f"📦 {item}: {version}")
|
312
312
|
except md.PackageNotFoundError:
|
313
313
|
items.append(f"❌ {item}: Not found")
|
314
|
-
|
314
|
+
out = sep.join(items).strip()
|
315
|
+
print(out)
|
315
316
|
return
|
316
317
|
|
317
318
|
class OperatingSystem(Enum):
|
@@ -320,7 +321,7 @@ class OperatingSystem(Enum):
|
|
320
321
|
MAC = auto()
|
321
322
|
|
322
323
|
|
323
|
-
def get_os(desired_os: OperatingSystem = None) -> bool:
|
324
|
+
def get_os(desired_os: OperatingSystem = None, verbose: bool = False) -> bool | str:
|
324
325
|
"""
|
325
326
|
A function that checks the operating system and returns a boolean value based on the desired operating system.
|
326
327
|
|
@@ -334,12 +335,13 @@ def get_os(desired_os: OperatingSystem = None) -> bool:
|
|
334
335
|
Returns:
|
335
336
|
bool: True if the desired operating system matches the current operating system, False otherwise. Returns None if desired_os is None.
|
336
337
|
"""
|
337
|
-
|
338
|
-
|
339
|
-
|
338
|
+
if verbose:
|
339
|
+
print(
|
340
|
+
f"💻 os: {os.name} | 🎯 system: {platform.system()} | 💽 release: {platform.release()}"
|
341
|
+
)
|
340
342
|
|
341
343
|
if desired_os is None:
|
342
|
-
return
|
344
|
+
return platform.system()
|
343
345
|
|
344
346
|
if desired_os == OperatingSystem.WINDOWS and platform.system() == "Windows":
|
345
347
|
return True
|
@@ -1,6 +1,5 @@
|
|
1
|
-
import warnings
|
2
|
-
|
3
|
-
warnings.filterwarnings("ignore")
|
1
|
+
# import warnings
|
2
|
+
# warnings.filterwarnings("ignore")
|
4
3
|
|
5
4
|
import math
|
6
5
|
import os
|
@@ -16,6 +15,8 @@ from scipy import stats
|
|
16
15
|
|
17
16
|
from .hlp import wrap_text
|
18
17
|
|
18
|
+
import duckdb as ddb
|
19
|
+
|
19
20
|
# from devtools import debug
|
20
21
|
|
21
22
|
pd.options.display.colheader_justify = "right"
|
@@ -29,6 +30,10 @@ KPI_LITERAL = Literal[
|
|
29
30
|
]
|
30
31
|
|
31
32
|
|
33
|
+
def descr_db(db: ddb.duckdb.DuckDBPyRelation, caption: str = "db")->None:
|
34
|
+
cols = ", ".join(db.columns)
|
35
|
+
print(f'🗄️ {caption}\t{db.count("*").fetchone()[0]:_}, {db.columns.__len__()}\n\t("{cols}")')
|
36
|
+
|
32
37
|
def describe_df(
|
33
38
|
df: pd.DataFrame,
|
34
39
|
caption: str,
|
@@ -77,7 +82,8 @@ def describe_df(
|
|
77
82
|
hint: skewness may not properly work if the columns is float and/or has only 1 value
|
78
83
|
"""
|
79
84
|
# * copy df, df col types are modified
|
80
|
-
df = df.copy()
|
85
|
+
df = df.fillna(pd.NA).copy()
|
86
|
+
df_ = df.copy()
|
81
87
|
|
82
88
|
# * check if df is empty
|
83
89
|
if len(df) == 0:
|
@@ -90,7 +96,8 @@ def describe_df(
|
|
90
96
|
df[col] = df[col].astype(str)
|
91
97
|
|
92
98
|
print(f"🔵 {'*'*3} df: {caption} {'*'*3}")
|
93
|
-
print(f"🟣 shape: ({df.shape[0]:_}, {df.shape[1]}) columns: {df.columns
|
99
|
+
print(f"🟣 shape: ({df.shape[0]:_}, {df.shape[1]}) columns: {np.array(df.columns)} ")
|
100
|
+
# print(f"🟣 shape: ({df.shape[0]:_}, {df.shape[1]}) columns: {df.columns.tolist()} ")
|
94
101
|
print(f"🟣 duplicates: {df.duplicated().sum():_}")
|
95
102
|
print(f"🟣 missings: {dict(df.isna().sum())}")
|
96
103
|
print("--- column uniques (all)")
|
@@ -210,7 +217,7 @@ def describe_df(
|
|
210
217
|
|
211
218
|
if use_missing:
|
212
219
|
import missingno as msno
|
213
|
-
msno.matrix(
|
220
|
+
msno.matrix(df_, figsize=(12, 5))
|
214
221
|
|
215
222
|
|
216
223
|
def pivot_df(
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: pandas-plots
|
3
|
-
Version: 0.11.
|
3
|
+
Version: 0.11.13
|
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
|
@@ -28,6 +28,9 @@ Requires-Dist: Jinja2>=3.1.4
|
|
28
28
|
Requires-Dist: requests>=2.32.0
|
29
29
|
Requires-Dist: numpy<2.0.0
|
30
30
|
Requires-Dist: missingno>=0.5.2
|
31
|
+
Requires-Dist: duckdb>=1.0.0
|
32
|
+
Requires-Dist: kaleido>=0.2.1
|
33
|
+
Requires-Dist: nbformat>=4.2.0
|
31
34
|
|
32
35
|
# pandas-plots
|
33
36
|
|
@@ -78,6 +81,7 @@ tbl.show_num_df(
|
|
78
81
|
- `tbl` utilities for table descriptions
|
79
82
|
- 🌟`show_num_df()` displays a table as styled version with additional information
|
80
83
|
- `describe_df()` an alternative version of pandas `describe()` function
|
84
|
+
- `descr_db()` a very short descr for a `duckdb` relation
|
81
85
|
- `pivot_df()` gets a pivot table of a 3 column dataframe (or 2 columns if no weights are given)
|
82
86
|
|
83
87
|
- `pls` for plotly visualizations
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{pandas_plots-0.11.11 → pandas_plots-0.11.13}/src/pandas_plots.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|