pandas-plots 0.11.19__tar.gz → 0.11.20__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pandas-plots
3
- Version: 0.11.19
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
@@ -1,6 +1,6 @@
1
1
  [metadata]
2
2
  name = pandas-plots
3
- version = 0.11.19
3
+ version = 0.11.20
4
4
  author = smeisegeier
5
5
  author_email = dexterDSDo@googlemail.com
6
6
  description = A collection of helper for table handling and vizualization
@@ -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,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pandas-plots
3
- Version: 0.11.19
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
File without changes
File without changes