dukit 0.1.0__tar.gz → 0.2.0__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.3
2
2
  Name: dukit
3
- Version: 0.1.0
3
+ Version: 0.2.0
4
4
  Summary: dukit - data utilities kit for exploring, modifying and visualizing small but messy data using pandas
5
5
  Author: MartinVoelkl94
6
6
  Author-email: MartinVoelkl94 <martinv16248@gmail.com>
@@ -23,9 +23,9 @@ It is implemented as a pandas [accessor extension](https://pandas.pydata.org/doc
23
23
 
24
24
  example:
25
25
  ```python
26
- from dukit import get_df
26
+ import dukit as dk
27
27
 
28
- df = get_df()
28
+ df = dk.get_df()
29
29
 
30
30
  #show all patients with ID > 20000
31
31
  df.dk.qs(r'id >20000')
@@ -46,9 +46,14 @@ df.dk.qs(r'age >18 &&<80 .color(green)')
46
46
  Take a look at "interactive_demo.ipynb" in the github repo for a quick syntax introduction and more examples.
47
47
 
48
48
  The query language allows for arbitrary code execution via eval(), please be aware of the risks.
49
+ <br>
50
+ <br>
51
+
49
52
 
50
- Currently published on [testpypi](https://test.pypi.org/project/dukit/).
51
53
 
54
+ # dk.diff()
55
+
56
+ Creates colored diff output between two datasets. See interactive_demo.ipynb for examples. Works with pandas dataframes, csv files, excel files and excel files with multiple sheets.
52
57
  <br>
53
58
  <br>
54
59
 
@@ -57,21 +62,33 @@ Currently published on [testpypi](https://test.pypi.org/project/dukit/).
57
62
 
58
63
  # other utilities
59
64
 
65
+ <br>
66
+ <br>
60
67
 
61
- ## logging with dukit.log()
68
+
69
+ ## dk.log()
62
70
 
63
71
  A small logger to be used in notebooks or the REPL. Makes it easier to keep track of outputs in large notebooks by providing color coded output. Does not log to file, but instead to a dataframe which can then be viewed at the end of the notebook.
64
72
  <br>
65
73
  <br>
66
74
 
67
75
 
68
- ## dukit.diff()
69
76
 
70
- creates colored diff output for two dataframes, see interactive_demo.ipynb for examples. Works with pandas dataframes, csv files, excel files and excel files with multiple sheets.
77
+ ## df reshaping
78
+
79
+ these functions offer various ways to deal with non-unique keys/ids.
80
+ primarily used when merging 2 dfs with a one-to-many relationship.
81
+
82
+ available functions:
83
+ - df.dk.flatten()
84
+ - df.dk.stagger()
85
+ - df.dk.embed()
86
+ - df.dk.collapse()
71
87
  <br>
72
88
  <br>
73
89
 
74
90
 
91
+
75
92
  ## "bashlike" wrappers
76
93
 
77
94
  While python has functions to achieve similar results as common bash commands, they are often more verbose, less intuitive if you are already used to the bash names and spread out over different modules and different namespaces in those modules (os, os.path, shutil, sys, ...).
@@ -79,35 +96,40 @@ These wrappers use the same names as the bash commands and offer some additional
79
96
 
80
97
 
81
98
  available wrappers:
82
- - dukit.ls()
83
- - dukit.lsr()
84
- - dukit.pwd()
85
- - dukit.cd()
86
- - dukit.cp()
87
- - dukit.mkdir()
88
- - dukit.isdir()
89
- - dukit.isfile()
90
- - dukit.ispath()
99
+ - dk.ls()
100
+ - dk.lsr()
101
+ - dk.pwd()
102
+ - dk.cd()
103
+ - dk.cp()
104
+ - dk.mv()
105
+ - dk.mkdir()
106
+ - dk.isdir()
107
+ - dk.isfile()
108
+ - dk.ispath()
91
109
  <br>
92
110
  <br>
93
111
 
94
112
 
95
- ## type conversion
113
+
114
+ ## type utilities
96
115
 
97
116
  Mostly wrappers for pandas functions but with some additional functionality and generally more lenient handling of edge cases.
98
117
 
99
- available functions:
100
- - dukit.int()
101
- - dukit.float()
102
- - dukit.num()
103
- - dukit.bool()
104
- - dukit.date()
105
- - dukit.datetime()
106
- - dukit.na()
107
- - dukit.nk()
108
- - dukit.yn()
109
- - dukit.type()
110
- - dukit.convert()
118
+ available functions/classes:
119
+ - dk.type()
120
+ - dk.convert()
121
+ - dk.str()
122
+ - dk.int()
123
+ - dk.float()
124
+ - dk.num()
125
+ - dk.bool()
126
+ - dk.date()
127
+ - dk.datetime()
128
+ - dk.na()
129
+ - dk.nk()
130
+ - dk.yn()
131
+ - dk.list()
132
+ - dk.Box
111
133
  <br>
112
134
  <br>
113
135
 
@@ -11,9 +11,9 @@ It is implemented as a pandas [accessor extension](https://pandas.pydata.org/doc
11
11
 
12
12
  example:
13
13
  ```python
14
- from dukit import get_df
14
+ import dukit as dk
15
15
 
16
- df = get_df()
16
+ df = dk.get_df()
17
17
 
18
18
  #show all patients with ID > 20000
19
19
  df.dk.qs(r'id >20000')
@@ -34,9 +34,14 @@ df.dk.qs(r'age >18 &&<80 .color(green)')
34
34
  Take a look at "interactive_demo.ipynb" in the github repo for a quick syntax introduction and more examples.
35
35
 
36
36
  The query language allows for arbitrary code execution via eval(), please be aware of the risks.
37
+ <br>
38
+ <br>
39
+
37
40
 
38
- Currently published on [testpypi](https://test.pypi.org/project/dukit/).
39
41
 
42
+ # dk.diff()
43
+
44
+ Creates colored diff output between two datasets. See interactive_demo.ipynb for examples. Works with pandas dataframes, csv files, excel files and excel files with multiple sheets.
40
45
  <br>
41
46
  <br>
42
47
 
@@ -45,21 +50,33 @@ Currently published on [testpypi](https://test.pypi.org/project/dukit/).
45
50
 
46
51
  # other utilities
47
52
 
53
+ <br>
54
+ <br>
48
55
 
49
- ## logging with dukit.log()
56
+
57
+ ## dk.log()
50
58
 
51
59
  A small logger to be used in notebooks or the REPL. Makes it easier to keep track of outputs in large notebooks by providing color coded output. Does not log to file, but instead to a dataframe which can then be viewed at the end of the notebook.
52
60
  <br>
53
61
  <br>
54
62
 
55
63
 
56
- ## dukit.diff()
57
64
 
58
- creates colored diff output for two dataframes, see interactive_demo.ipynb for examples. Works with pandas dataframes, csv files, excel files and excel files with multiple sheets.
65
+ ## df reshaping
66
+
67
+ these functions offer various ways to deal with non-unique keys/ids.
68
+ primarily used when merging 2 dfs with a one-to-many relationship.
69
+
70
+ available functions:
71
+ - df.dk.flatten()
72
+ - df.dk.stagger()
73
+ - df.dk.embed()
74
+ - df.dk.collapse()
59
75
  <br>
60
76
  <br>
61
77
 
62
78
 
79
+
63
80
  ## "bashlike" wrappers
64
81
 
65
82
  While python has functions to achieve similar results as common bash commands, they are often more verbose, less intuitive if you are already used to the bash names and spread out over different modules and different namespaces in those modules (os, os.path, shutil, sys, ...).
@@ -67,35 +84,40 @@ These wrappers use the same names as the bash commands and offer some additional
67
84
 
68
85
 
69
86
  available wrappers:
70
- - dukit.ls()
71
- - dukit.lsr()
72
- - dukit.pwd()
73
- - dukit.cd()
74
- - dukit.cp()
75
- - dukit.mkdir()
76
- - dukit.isdir()
77
- - dukit.isfile()
78
- - dukit.ispath()
87
+ - dk.ls()
88
+ - dk.lsr()
89
+ - dk.pwd()
90
+ - dk.cd()
91
+ - dk.cp()
92
+ - dk.mv()
93
+ - dk.mkdir()
94
+ - dk.isdir()
95
+ - dk.isfile()
96
+ - dk.ispath()
79
97
  <br>
80
98
  <br>
81
99
 
82
100
 
83
- ## type conversion
101
+
102
+ ## type utilities
84
103
 
85
104
  Mostly wrappers for pandas functions but with some additional functionality and generally more lenient handling of edge cases.
86
105
 
87
- available functions:
88
- - dukit.int()
89
- - dukit.float()
90
- - dukit.num()
91
- - dukit.bool()
92
- - dukit.date()
93
- - dukit.datetime()
94
- - dukit.na()
95
- - dukit.nk()
96
- - dukit.yn()
97
- - dukit.type()
98
- - dukit.convert()
106
+ available functions/classes:
107
+ - dk.type()
108
+ - dk.convert()
109
+ - dk.str()
110
+ - dk.int()
111
+ - dk.float()
112
+ - dk.num()
113
+ - dk.bool()
114
+ - dk.date()
115
+ - dk.datetime()
116
+ - dk.na()
117
+ - dk.nk()
118
+ - dk.yn()
119
+ - dk.list()
120
+ - dk.Box
99
121
  <br>
100
122
  <br>
101
123
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "dukit"
3
- version = "0.1.0"
3
+ version = "0.2.0"
4
4
  description = "dukit - data utilities kit for exploring, modifying and visualizing small but messy data using pandas"
5
5
  readme = "README.md"
6
6
  authors = [
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes