pandas-plots 0.11.18__py3-none-any.whl → 0.11.20__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/tbl.py CHANGED
@@ -30,10 +30,34 @@ KPI_LITERAL = Literal[
30
30
  ]
31
31
 
32
32
 
33
- def descr_db(db: ddb.duckdb.DuckDBPyRelation, caption: str = "db")->None:
33
+ def descr_db(
34
+ db: ddb.duckdb.DuckDBPyRelation,
35
+ caption: str = "db",
36
+ use_preview: bool = True,
37
+ )->None:
38
+ """
39
+ Print a short description of the given duckdb relation.
40
+
41
+ Parameters
42
+ ----------
43
+ db: ddb.duckdb.DuckDBPyRelation
44
+ The relation to be described
45
+ caption: str, optional
46
+ A caption to be printed left of the description. Defaults to "db".
47
+ use_preview: bool, optional
48
+ Whether to print a preview of the first 3 rows of the relation. Defaults to True.
49
+
50
+ Returns
51
+ -------
52
+ None
53
+ """
34
54
  cols = ", ".join(db.columns)
35
55
  print(f'🗄️ {caption}\t{db.count("*").fetchone()[0]:_}, {db.columns.__len__()}\n\t("{cols}")')
36
56
 
57
+ if use_preview:
58
+ db.limit(3).show()
59
+ return
60
+
37
61
  def describe_df(
38
62
  df: pd.DataFrame,
39
63
  caption: str,
@@ -142,6 +166,10 @@ def describe_df(
142
166
 
143
167
  # ! *** PLOTS ***
144
168
  if use_plot:
169
+ # * fix bug(?) in plotly/choreographer - datetime columns are not plotted, set these to str
170
+ datetime_cols = df.select_dtypes(include=['datetime64']).columns
171
+ df[datetime_cols] = df[datetime_cols].astype(str)
172
+
145
173
  # * reduce column names len if selected
146
174
  if top_n_chars_in_columns > 0:
147
175
  # * minumum 10 chars, or display is cluttered
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pandas-plots
3
- Version: 0.11.18
3
+ Version: 0.11.20
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
@@ -19,18 +19,18 @@ Classifier: Topic :: Scientific/Engineering
19
19
  Requires-Python: >=3.10
20
20
  Description-Content-Type: text/markdown
21
21
  License-File: LICENSE
22
- Requires-Dist: pandas >=2.0.0
23
- Requires-Dist: plotly >=5.18.0
24
- Requires-Dist: matplotlib >=3.8.2
25
- Requires-Dist: matplotlib-venn ==0.11.10
26
- Requires-Dist: seaborn >=0.13.2
27
- Requires-Dist: Jinja2 >=3.1.4
28
- Requires-Dist: requests >=2.32.0
29
- Requires-Dist: numpy <2.0.0
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
22
+ Requires-Dist: pandas>=2.0.0
23
+ Requires-Dist: plotly>=5.18.0
24
+ Requires-Dist: matplotlib>=3.8.2
25
+ Requires-Dist: matplotlib-venn==0.11.10
26
+ Requires-Dist: seaborn>=0.13.2
27
+ Requires-Dist: Jinja2>=3.1.4
28
+ Requires-Dist: requests>=2.32.0
29
+ Requires-Dist: numpy<2.0.0
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
34
34
 
35
35
  # pandas-plots
36
36
 
@@ -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=C-EUvt9u7aXd6va7BGamf6HSODOnvbERwxu2Gb8PgbQ,35449
4
+ pandas_plots/tbl.py,sha256=PuifjHBOXTH4OAIdEctGtyaD9IIybj9blasbw8udcho,27800
5
+ pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
+ pandas_plots-0.11.20.dist-info/LICENSE,sha256=6KQ5KVAAhRaB-JJKpX4cefKvRZRgI7GUPc92_2d31XY,1051
7
+ pandas_plots-0.11.20.dist-info/METADATA,sha256=wluzOws4R73y0i-3AWMJKGMwRL8NdaBpVEQF4HfLY5c,7071
8
+ pandas_plots-0.11.20.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
9
+ pandas_plots-0.11.20.dist-info/top_level.txt,sha256=XnaNuIHBqMmCeh_U7nKOYTwFue_SIA0wxuDgdPmnnSk,13
10
+ pandas_plots-0.11.20.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.5.0)
2
+ Generator: setuptools (75.6.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=wrvy36rnSdg1I4uQjIzzwGmjcN0gvSfKylRf_7GKpXs,12001
2
- pandas_plots/pii.py,sha256=2WKE-W9s285jPdsTqCgt1uxuW4lj1PYCVOYB2fYDNwQ,2195
3
- pandas_plots/pls.py,sha256=C-EUvt9u7aXd6va7BGamf6HSODOnvbERwxu2Gb8PgbQ,35449
4
- pandas_plots/tbl.py,sha256=Zlta8pPFcY_NcEhXgp0NkAWT4D-yymX4LSNEH8bBM9Q,27029
5
- pandas_plots/ven.py,sha256=2x3ACo2vSfO3q6fv-UdDQ0h1SJyt8WChBGgE5SDCdCk,11673
6
- pandas_plots-0.11.18.dist-info/LICENSE,sha256=6KQ5KVAAhRaB-JJKpX4cefKvRZRgI7GUPc92_2d31XY,1051
7
- pandas_plots-0.11.18.dist-info/METADATA,sha256=nfWgEnKQELhH7r5gpPLFrziJ7tPMhaGWGKLzNG-JXVo,7083
8
- pandas_plots-0.11.18.dist-info/WHEEL,sha256=R06PA3UVYHThwHvxuRWMqaGcr-PuniXahwjmQRFMEkY,91
9
- pandas_plots-0.11.18.dist-info/top_level.txt,sha256=XnaNuIHBqMmCeh_U7nKOYTwFue_SIA0wxuDgdPmnnSk,13
10
- pandas_plots-0.11.18.dist-info/RECORD,,