pytae 2.2.2__tar.gz → 2.2.3__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.
Files changed (35) hide show
  1. pytae-2.2.3/.ipynb_checkpoints/README-checkpoint.md +20 -0
  2. {pytae-2.2.2 → pytae-2.2.3}/.ipynb_checkpoints/pyproject-checkpoint.toml +1 -1
  3. {pytae-2.2.2 → pytae-2.2.3}/PKG-INFO +12 -5
  4. pytae-2.2.3/README.md +20 -0
  5. {pytae-2.2.2 → pytae-2.2.3}/pyproject.toml +1 -1
  6. pytae-2.2.3/src/.ipynb_checkpoints/other_utilities-checkpoint.ipynb +333 -0
  7. pytae-2.2.3/src/other_utilities.ipynb +333 -0
  8. pytae-2.2.3/src/pytae/.ipynb_checkpoints/__init__-checkpoint.py +4 -0
  9. pytae-2.2.2/src/pytae/extend_pandas.py → pytae-2.2.3/src/pytae/.ipynb_checkpoints/other_utilities-checkpoint.py +2 -3
  10. pytae-2.2.3/src/pytae/__init__.py +4 -0
  11. pytae-2.2.2/src/pytae/.ipynb_checkpoints/extend_pandas-checkpoint.py → pytae-2.2.3/src/pytae/other_utilities.py +2 -3
  12. pytae-2.2.2/.ipynb_checkpoints/README-checkpoint.md +0 -13
  13. pytae-2.2.2/README.md +0 -13
  14. pytae-2.2.2/src/.ipynb_checkpoints/other_examples-checkpoint.ipynb +0 -1817
  15. pytae-2.2.2/src/other_examples.ipynb +0 -1873
  16. pytae-2.2.2/src/pytae/.ipynb_checkpoints/__init__-checkpoint.py +0 -4
  17. pytae-2.2.2/src/pytae/__init__.py +0 -4
  18. {pytae-2.2.2 → pytae-2.2.3}/.github/workflows/publish-to-test-pypi.yml +0 -0
  19. {pytae-2.2.2 → pytae-2.2.3}/.gitignore +0 -0
  20. {pytae-2.2.2 → pytae-2.2.3}/.ipynb_checkpoints/LICENSE-checkpoint +0 -0
  21. {pytae-2.2.2 → pytae-2.2.3}/.ipynb_checkpoints/requirements-checkpoint.txt +0 -0
  22. {pytae-2.2.2 → pytae-2.2.3}/LICENSE +0 -0
  23. {pytae-2.2.2 → pytae-2.2.3}/requirements.txt +0 -0
  24. {pytae-2.2.2 → pytae-2.2.3}/src/.ipynb_checkpoints/agg_df-checkpoint.ipynb +0 -0
  25. {pytae-2.2.2 → pytae-2.2.3}/src/.ipynb_checkpoints/get_data-checkpoint.ipynb +0 -0
  26. {pytae-2.2.2 → pytae-2.2.3}/src/.ipynb_checkpoints/shape-checkpoint.ipynb +0 -0
  27. {pytae-2.2.2 → pytae-2.2.3}/src/agg_df.ipynb +0 -0
  28. {pytae-2.2.2 → pytae-2.2.3}/src/get_data.ipynb +0 -0
  29. {pytae-2.2.2 → pytae-2.2.3}/src/pytae/.ipynb_checkpoints/agg_df-checkpoint.py +0 -0
  30. {pytae-2.2.2 → pytae-2.2.3}/src/pytae/.ipynb_checkpoints/get_data-checkpoint.py +0 -0
  31. {pytae-2.2.2 → pytae-2.2.3}/src/pytae/.ipynb_checkpoints/shape-checkpoint.py +0 -0
  32. {pytae-2.2.2 → pytae-2.2.3}/src/pytae/agg_df.py +0 -0
  33. {pytae-2.2.2 → pytae-2.2.3}/src/pytae/get_data.py +0 -0
  34. {pytae-2.2.2 → pytae-2.2.3}/src/pytae/shape.py +0 -0
  35. {pytae-2.2.2 → pytae-2.2.3}/src/shape.ipynb +0 -0
@@ -0,0 +1,20 @@
1
+ # This is my day to day util
2
+
3
+
4
+
5
+ ## This contains three sets of features:-
6
+
7
+ ### 1) that does basic data aggregation
8
+ https://github.com/maddytae/pytae/blob/master/src/agg_df.ipynb
9
+
10
+ ### 2) that transforms data long to wide; wide to long etc
11
+ https://github.com/maddytae/pytae/blob/master/src/shape.ipynb
12
+
13
+ ### 3) that gets aggregated subset of a dataframe
14
+ https://github.com/maddytae/pytae/blob/master/src/get_data.ipynb
15
+
16
+ ### 4) some addditional utilities
17
+ https://github.com/maddytae/pytae/blob/master/src/other_utilities.ipynb
18
+
19
+ #### To Do: Documentation and automated Testing features
20
+
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pytae"
7
- version = "2.2.2"
7
+ version = "2.2.3"
8
8
  authors = [
9
9
  { name="Madhukar Kumar Jha", email="madhukar.k.jha@gmail.com" },
10
10
  ]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pytae
3
- Version: 2.2.2
3
+ Version: 2.2.3
4
4
  Dynamic: Requires-Dist
5
5
  Summary: A package to enhance common day to day tasks in the life of a data scientist
6
6
  Project-URL: Homepage, https://github.com/maddytae/pytae
@@ -15,14 +15,21 @@ Description-Content-Type: text/markdown
15
15
 
16
16
  # This is my day to day util
17
17
 
18
+
19
+
18
20
  ## This contains three sets of features:-
19
21
 
20
- ### one that extends pandas capabilities
22
+ ### 1) that does basic data aggregation
23
+ https://github.com/maddytae/pytae/blob/master/src/agg_df.ipynb
24
+
25
+ ### 2) that transforms data long to wide; wide to long etc
26
+ https://github.com/maddytae/pytae/blob/master/src/shape.ipynb
21
27
 
22
- ### two that allows to process tar files and some other interesting features and
28
+ ### 3) that gets aggregated subset of a dataframe
29
+ https://github.com/maddytae/pytae/blob/master/src/get_data.ipynb
23
30
 
24
- ### three reconcilliation of two dataframes.
25
- https://github.com/maddytae/pytae/blob/master/src/recon.ipynb
31
+ ### 4) some addditional utilities
32
+ https://github.com/maddytae/pytae/blob/master/src/other_utilities.ipynb
26
33
 
27
34
  #### To Do: Documentation and automated Testing features
28
35
 
pytae-2.2.3/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # This is my day to day util
2
+
3
+
4
+
5
+ ## This contains three sets of features:-
6
+
7
+ ### 1) that does basic data aggregation
8
+ https://github.com/maddytae/pytae/blob/master/src/agg_df.ipynb
9
+
10
+ ### 2) that transforms data long to wide; wide to long etc
11
+ https://github.com/maddytae/pytae/blob/master/src/shape.ipynb
12
+
13
+ ### 3) that gets aggregated subset of a dataframe
14
+ https://github.com/maddytae/pytae/blob/master/src/get_data.ipynb
15
+
16
+ ### 4) some addditional utilities
17
+ https://github.com/maddytae/pytae/blob/master/src/other_utilities.ipynb
18
+
19
+ #### To Do: Documentation and automated Testing features
20
+
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "pytae"
7
- version = "2.2.2"
7
+ version = "2.2.3"
8
8
  authors = [
9
9
  { name="Madhukar Kumar Jha", email="madhukar.k.jha@gmail.com" },
10
10
  ]
@@ -0,0 +1,333 @@
1
+ {
2
+ "cells": [
3
+ {
4
+ "cell_type": "code",
5
+ "execution_count": 12,
6
+ "id": "af0e75c1-7748-44e7-974e-34112d92d813",
7
+ "metadata": {},
8
+ "outputs": [],
9
+ "source": [
10
+ "import pandas as pd\n",
11
+ "import pytae as pt\n",
12
+ "import seaborn as sns\n",
13
+ "penguins = sns.load_dataset('penguins')"
14
+ ]
15
+ },
16
+ {
17
+ "cell_type": "code",
18
+ "execution_count": 13,
19
+ "id": "e42e01b5-4b00-4f95-acec-274deda67a3c",
20
+ "metadata": {},
21
+ "outputs": [
22
+ {
23
+ "data": {
24
+ "text/plain": [
25
+ "['bill_depth_mm',\n",
26
+ " 'bill_length_mm',\n",
27
+ " 'body_mass_g',\n",
28
+ " 'flipper_length_mm',\n",
29
+ " 'island',\n",
30
+ " 'sex',\n",
31
+ " 'species']"
32
+ ]
33
+ },
34
+ "execution_count": 13,
35
+ "metadata": {},
36
+ "output_type": "execute_result"
37
+ }
38
+ ],
39
+ "source": [
40
+ "# get a list of columns\n",
41
+ "penguins.cols()"
42
+ ]
43
+ },
44
+ {
45
+ "cell_type": "code",
46
+ "execution_count": 14,
47
+ "id": "e7136bed-d2e1-48c5-a337-8e31fc020a98",
48
+ "metadata": {},
49
+ "outputs": [
50
+ {
51
+ "data": {
52
+ "text/html": [
53
+ "<div>\n",
54
+ "<style scoped>\n",
55
+ " .dataframe tbody tr th:only-of-type {\n",
56
+ " vertical-align: middle;\n",
57
+ " }\n",
58
+ "\n",
59
+ " .dataframe tbody tr th {\n",
60
+ " vertical-align: top;\n",
61
+ " }\n",
62
+ "\n",
63
+ " .dataframe thead th {\n",
64
+ " text-align: right;\n",
65
+ " }\n",
66
+ "</style>\n",
67
+ "<table border=\"1\" class=\"dataframe\">\n",
68
+ " <thead>\n",
69
+ " <tr style=\"text-align: right;\">\n",
70
+ " <th></th>\n",
71
+ " <th>species</th>\n",
72
+ " <th>island</th>\n",
73
+ " <th>bill_length_mm</th>\n",
74
+ " <th>bill_depth_mm</th>\n",
75
+ " <th>flipper_length_mm</th>\n",
76
+ " <th>body_mass_g</th>\n",
77
+ " <th>sex</th>\n",
78
+ " <th>n</th>\n",
79
+ " </tr>\n",
80
+ " </thead>\n",
81
+ " <tbody>\n",
82
+ " <tr>\n",
83
+ " <th>0</th>\n",
84
+ " <td>Adelie</td>\n",
85
+ " <td>Torgersen</td>\n",
86
+ " <td>39.1</td>\n",
87
+ " <td>18.7</td>\n",
88
+ " <td>181.0</td>\n",
89
+ " <td>3750.0</td>\n",
90
+ " <td>Male</td>\n",
91
+ " <td>23</td>\n",
92
+ " </tr>\n",
93
+ " <tr>\n",
94
+ " <th>1</th>\n",
95
+ " <td>Adelie</td>\n",
96
+ " <td>Torgersen</td>\n",
97
+ " <td>39.5</td>\n",
98
+ " <td>17.4</td>\n",
99
+ " <td>186.0</td>\n",
100
+ " <td>3800.0</td>\n",
101
+ " <td>Female</td>\n",
102
+ " <td>24</td>\n",
103
+ " </tr>\n",
104
+ " <tr>\n",
105
+ " <th>2</th>\n",
106
+ " <td>Adelie</td>\n",
107
+ " <td>Torgersen</td>\n",
108
+ " <td>40.3</td>\n",
109
+ " <td>18.0</td>\n",
110
+ " <td>195.0</td>\n",
111
+ " <td>3250.0</td>\n",
112
+ " <td>Female</td>\n",
113
+ " <td>24</td>\n",
114
+ " </tr>\n",
115
+ " <tr>\n",
116
+ " <th>3</th>\n",
117
+ " <td>Adelie</td>\n",
118
+ " <td>Torgersen</td>\n",
119
+ " <td>NaN</td>\n",
120
+ " <td>NaN</td>\n",
121
+ " <td>NaN</td>\n",
122
+ " <td>NaN</td>\n",
123
+ " <td>NaN</td>\n",
124
+ " <td>5</td>\n",
125
+ " </tr>\n",
126
+ " <tr>\n",
127
+ " <th>4</th>\n",
128
+ " <td>Adelie</td>\n",
129
+ " <td>Torgersen</td>\n",
130
+ " <td>36.7</td>\n",
131
+ " <td>19.3</td>\n",
132
+ " <td>193.0</td>\n",
133
+ " <td>3450.0</td>\n",
134
+ " <td>Female</td>\n",
135
+ " <td>24</td>\n",
136
+ " </tr>\n",
137
+ " </tbody>\n",
138
+ "</table>\n",
139
+ "</div>"
140
+ ],
141
+ "text/plain": [
142
+ " species island bill_length_mm bill_depth_mm flipper_length_mm \\\n",
143
+ "0 Adelie Torgersen 39.1 18.7 181.0 \n",
144
+ "1 Adelie Torgersen 39.5 17.4 186.0 \n",
145
+ "2 Adelie Torgersen 40.3 18.0 195.0 \n",
146
+ "3 Adelie Torgersen NaN NaN NaN \n",
147
+ "4 Adelie Torgersen 36.7 19.3 193.0 \n",
148
+ "\n",
149
+ " body_mass_g sex n \n",
150
+ "0 3750.0 Male 23 \n",
151
+ "1 3800.0 Female 24 \n",
152
+ "2 3250.0 Female 24 \n",
153
+ "3 NaN NaN 5 \n",
154
+ "4 3450.0 Female 24 "
155
+ ]
156
+ },
157
+ "execution_count": 14,
158
+ "metadata": {},
159
+ "output_type": "execute_result"
160
+ }
161
+ ],
162
+ "source": [
163
+ "#add a group count\n",
164
+ "df = (\n",
165
+ " penguins\n",
166
+ " .pipe(pt.group_n,group=['species', 'island', 'sex'],dropna=False)\n",
167
+ ")\n",
168
+ "df.head()"
169
+ ]
170
+ },
171
+ {
172
+ "cell_type": "code",
173
+ "execution_count": 15,
174
+ "id": "87e3dd20-d5e1-4219-8aee-e842a3d52194",
175
+ "metadata": {},
176
+ "outputs": [
177
+ {
178
+ "data": {
179
+ "text/html": [
180
+ "<div>\n",
181
+ "<style scoped>\n",
182
+ " .dataframe tbody tr th:only-of-type {\n",
183
+ " vertical-align: middle;\n",
184
+ " }\n",
185
+ "\n",
186
+ " .dataframe tbody tr th {\n",
187
+ " vertical-align: top;\n",
188
+ " }\n",
189
+ "\n",
190
+ " .dataframe thead th {\n",
191
+ " text-align: right;\n",
192
+ " }\n",
193
+ "</style>\n",
194
+ "<table border=\"1\" class=\"dataframe\">\n",
195
+ " <thead>\n",
196
+ " <tr style=\"text-align: right;\">\n",
197
+ " <th></th>\n",
198
+ " <th>species</th>\n",
199
+ " <th>island</th>\n",
200
+ " <th>bill_length_mm</th>\n",
201
+ " <th>bill_depth_mm</th>\n",
202
+ " <th>flipper_length_mm</th>\n",
203
+ " <th>body_mass_g</th>\n",
204
+ " <th>sex</th>\n",
205
+ " </tr>\n",
206
+ " </thead>\n",
207
+ " <tbody>\n",
208
+ " <tr>\n",
209
+ " <th>0</th>\n",
210
+ " <td>Adelie</td>\n",
211
+ " <td>Torgersen</td>\n",
212
+ " <td>39.1</td>\n",
213
+ " <td>18.7</td>\n",
214
+ " <td>181.0</td>\n",
215
+ " <td>3750.0</td>\n",
216
+ " <td>Male</td>\n",
217
+ " </tr>\n",
218
+ " <tr>\n",
219
+ " <th>1</th>\n",
220
+ " <td>Adelie</td>\n",
221
+ " <td>Torgersen</td>\n",
222
+ " <td>39.5</td>\n",
223
+ " <td>17.4</td>\n",
224
+ " <td>186.0</td>\n",
225
+ " <td>3800.0</td>\n",
226
+ " <td>Female</td>\n",
227
+ " </tr>\n",
228
+ " <tr>\n",
229
+ " <th>2</th>\n",
230
+ " <td>Adelie</td>\n",
231
+ " <td>Torgersen</td>\n",
232
+ " <td>40.3</td>\n",
233
+ " <td>18.0</td>\n",
234
+ " <td>195.0</td>\n",
235
+ " <td>3250.0</td>\n",
236
+ " <td>Female</td>\n",
237
+ " </tr>\n",
238
+ " <tr>\n",
239
+ " <th>3</th>\n",
240
+ " <td>Adelie</td>\n",
241
+ " <td>Torgersen</td>\n",
242
+ " <td>0.0</td>\n",
243
+ " <td>0.0</td>\n",
244
+ " <td>0.0</td>\n",
245
+ " <td>0.0</td>\n",
246
+ " <td>.</td>\n",
247
+ " </tr>\n",
248
+ " <tr>\n",
249
+ " <th>4</th>\n",
250
+ " <td>Adelie</td>\n",
251
+ " <td>Torgersen</td>\n",
252
+ " <td>36.7</td>\n",
253
+ " <td>19.3</td>\n",
254
+ " <td>193.0</td>\n",
255
+ " <td>3450.0</td>\n",
256
+ " <td>Female</td>\n",
257
+ " </tr>\n",
258
+ " </tbody>\n",
259
+ "</table>\n",
260
+ "</div>"
261
+ ],
262
+ "text/plain": [
263
+ " species island bill_length_mm bill_depth_mm flipper_length_mm \\\n",
264
+ "0 Adelie Torgersen 39.1 18.7 181.0 \n",
265
+ "1 Adelie Torgersen 39.5 17.4 186.0 \n",
266
+ "2 Adelie Torgersen 40.3 18.0 195.0 \n",
267
+ "3 Adelie Torgersen 0.0 0.0 0.0 \n",
268
+ "4 Adelie Torgersen 36.7 19.3 193.0 \n",
269
+ "\n",
270
+ " body_mass_g sex \n",
271
+ "0 3750.0 Male \n",
272
+ "1 3800.0 Female \n",
273
+ "2 3250.0 Female \n",
274
+ "3 0.0 . \n",
275
+ "4 3450.0 Female "
276
+ ]
277
+ },
278
+ "execution_count": 15,
279
+ "metadata": {},
280
+ "output_type": "execute_result"
281
+ }
282
+ ],
283
+ "source": [
284
+ "# handle missing i.e. str missing or NaN is changed to . and numeric NaN to 0\n",
285
+ "# add a group count\n",
286
+ "df = (\n",
287
+ " penguins\n",
288
+ " .pipe(pt.handle_missing)\n",
289
+ ")\n",
290
+ "df.head()\n"
291
+ ]
292
+ },
293
+ {
294
+ "cell_type": "code",
295
+ "execution_count": 16,
296
+ "id": "b17a9574-35ff-4fe2-b40f-054a0b5e5003",
297
+ "metadata": {},
298
+ "outputs": [],
299
+ "source": [
300
+ "df.clip()"
301
+ ]
302
+ },
303
+ {
304
+ "cell_type": "code",
305
+ "execution_count": null,
306
+ "id": "b39ba218-6361-47eb-91b2-c6f35b7a130e",
307
+ "metadata": {},
308
+ "outputs": [],
309
+ "source": []
310
+ }
311
+ ],
312
+ "metadata": {
313
+ "kernelspec": {
314
+ "display_name": "py_env",
315
+ "language": "python",
316
+ "name": "py_env"
317
+ },
318
+ "language_info": {
319
+ "codemirror_mode": {
320
+ "name": "ipython",
321
+ "version": 3
322
+ },
323
+ "file_extension": ".py",
324
+ "mimetype": "text/x-python",
325
+ "name": "python",
326
+ "nbconvert_exporter": "python",
327
+ "pygments_lexer": "ipython3",
328
+ "version": "3.9.6"
329
+ }
330
+ },
331
+ "nbformat": 4,
332
+ "nbformat_minor": 5
333
+ }