halib 0.1.39__py3-none-any.whl → 0.1.40__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.
- halib/filetype/csvfile.py +26 -0
- {halib-0.1.39.dist-info → halib-0.1.40.dist-info}/METADATA +8 -3
- {halib-0.1.39.dist-info → halib-0.1.40.dist-info}/RECORD +6 -6
- {halib-0.1.39.dist-info → halib-0.1.40.dist-info}/LICENSE.txt +0 -0
- {halib-0.1.39.dist-info → halib-0.1.40.dist-info}/WHEEL +0 -0
- {halib-0.1.39.dist-info → halib-0.1.40.dist-info}/top_level.txt +0 -0
halib/filetype/csvfile.py
CHANGED
@@ -6,6 +6,8 @@ from rich import inspect
|
|
6
6
|
from rich.pretty import pprint
|
7
7
|
from tqdm import tqdm
|
8
8
|
from loguru import logger
|
9
|
+
from itables import init_notebook_mode, show
|
10
|
+
import pygwalker as pyg
|
9
11
|
|
10
12
|
console = Console()
|
11
13
|
|
@@ -44,6 +46,30 @@ def fn_insert_rows(df, singleRow_or_rowList):
|
|
44
46
|
def fn_display_df(df):
|
45
47
|
print(tabulate(df, headers="keys", tablefmt="psql", numalign="right"))
|
46
48
|
|
49
|
+
def showdf(df, display_mode="itable", in_jupyter=True, all_interactive=False):
|
50
|
+
if display_mode == "itable":
|
51
|
+
if in_jupyter:
|
52
|
+
init_notebook_mode(all_interactive=all_interactive)
|
53
|
+
show(
|
54
|
+
df,
|
55
|
+
# layout={"top1": "searchPanes"},
|
56
|
+
# searchPanes={"layout": "column-3", "cascadePanes": True},
|
57
|
+
caption="table caption",
|
58
|
+
layout={"top1": "searchBuilder"},
|
59
|
+
buttons=["csvHtml5", "excelHtml5", "colvis"],
|
60
|
+
search={"regex": True, "caseInsensitive": True},
|
61
|
+
paging=False, # no paging
|
62
|
+
scrollY="300px", # height of table
|
63
|
+
scrollCollapse=True,
|
64
|
+
showIndex=True, # show row no.
|
65
|
+
select=True, # allow row selected
|
66
|
+
keys=True, # enable navigate using arrow keys
|
67
|
+
)
|
68
|
+
elif display_mode == "pygwalker":
|
69
|
+
return pyg.walk(df)
|
70
|
+
else:
|
71
|
+
raise ValueError("Invalid display mode, current support [itable, pygwalker]")
|
72
|
+
|
47
73
|
|
48
74
|
def fn_config_display_pd(
|
49
75
|
max_rows=None,
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: halib
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.40
|
4
4
|
Summary: Small library for common tasks
|
5
5
|
Author: Hoang Van Ha
|
6
6
|
Author-email: hoangvanhauit@gmail.com
|
@@ -17,7 +17,6 @@ Requires-Dist: click
|
|
17
17
|
Requires-Dist: enlighten
|
18
18
|
Requires-Dist: kaleido (==0.1.*)
|
19
19
|
Requires-Dist: loguru
|
20
|
-
Requires-Dist: matplotlib
|
21
20
|
Requires-Dist: more-itertools
|
22
21
|
Requires-Dist: moviepy
|
23
22
|
Requires-Dist: networkx
|
@@ -26,20 +25,26 @@ Requires-Dist: omegaconf
|
|
26
25
|
Requires-Dist: opencv-python
|
27
26
|
Requires-Dist: pandas
|
28
27
|
Requires-Dist: Pillow
|
29
|
-
Requires-Dist: plotly
|
30
28
|
Requires-Dist: Pyarrow
|
31
29
|
Requires-Dist: pycurl
|
32
30
|
Requires-Dist: python-telegram-bot
|
33
31
|
Requires-Dist: requests
|
34
32
|
Requires-Dist: rich
|
35
33
|
Requires-Dist: scikit-learn
|
34
|
+
Requires-Dist: matplotlib
|
36
35
|
Requires-Dist: seaborn
|
36
|
+
Requires-Dist: plotly
|
37
|
+
Requires-Dist: pygwalker
|
37
38
|
Requires-Dist: tabulate
|
39
|
+
Requires-Dist: itables
|
38
40
|
Requires-Dist: timebudget
|
39
41
|
Requires-Dist: tqdm
|
40
42
|
Requires-Dist: tube-dl
|
41
43
|
|
42
44
|
Helper package for coding and automation
|
45
|
+
**Version 0.1.40**
|
46
|
+
|
47
|
+
+ update <csvfile.py> to use `itables` and `pygwalker` to display dataframe in jupyter notebook.
|
43
48
|
|
44
49
|
**Version 0.1.38**
|
45
50
|
|
@@ -16,7 +16,7 @@ halib/textfile.py,sha256=EhVFrit-nRBJx18e6rtIqcE1cSbgsLnMXe_kdhi1EPI,399
|
|
16
16
|
halib/torchloader.py,sha256=-q9YE-AoHZE1xQX2dgNxdqtucEXYs4sQ22WXdl6EGfI,6500
|
17
17
|
halib/videofile.py,sha256=NTLTZ-j6YD47duw2LN2p-lDQDglYFP1LpEU_0gzHLdI,4737
|
18
18
|
halib/filetype/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
19
|
-
halib/filetype/csvfile.py,sha256=
|
19
|
+
halib/filetype/csvfile.py,sha256=8GO2y6NbLR3yyJgU3mBRP6c0bvwAUkbfuqj82UicfYI,5268
|
20
20
|
halib/filetype/jsonfile.py,sha256=9LBdM7LV9QgJA1bzJRkq69qpWOP22HDXPGirqXTgSCw,480
|
21
21
|
halib/filetype/textfile.py,sha256=QtuI5PdLxu4hAqSeafr3S8vCXwtvgipWV4Nkl7AzDYM,399
|
22
22
|
halib/filetype/videofile.py,sha256=4nfVAYYtoT76y8P4WYyxNna4Iv1o2iV6xaMcUzNPC4s,4736
|
@@ -32,8 +32,8 @@ halib/sys/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
|
|
32
32
|
halib/system/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
33
33
|
halib/system/cmd.py,sha256=b2x7JPcNnFjLGheIESVYvqAb-w2UwBM1PAwYxMZ5YjA,228
|
34
34
|
halib/system/filesys.py,sha256=ERpnELLDKJoTIIKf-AajgkY62nID4qmqmX5TkE95APU,2931
|
35
|
-
halib-0.1.
|
36
|
-
halib-0.1.
|
37
|
-
halib-0.1.
|
38
|
-
halib-0.1.
|
39
|
-
halib-0.1.
|
35
|
+
halib-0.1.40.dist-info/LICENSE.txt,sha256=qZssdna4aETiR8znYsShUjidu-U4jUT9Q-EWNlZ9yBQ,1100
|
36
|
+
halib-0.1.40.dist-info/METADATA,sha256=eFwReuUr51KBxzpHNiwcsVJ9rlsvn1lGf7A9ZZ-i3PE,3344
|
37
|
+
halib-0.1.40.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
38
|
+
halib-0.1.40.dist-info/top_level.txt,sha256=7AD6PLaQTreE0Fn44mdZsoHBe_Zdd7GUmjsWPyQ7I-k,6
|
39
|
+
halib-0.1.40.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|