pytae 2.2.0__tar.gz → 2.2.2__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.
- {pytae-2.2.0 → pytae-2.2.2}/.ipynb_checkpoints/pyproject-checkpoint.toml +1 -1
- pytae-2.2.2/.ipynb_checkpoints/requirements-checkpoint.txt +2 -0
- {pytae-2.2.0 → pytae-2.2.2}/PKG-INFO +1 -1
- {pytae-2.2.0 → pytae-2.2.2}/pyproject.toml +1 -1
- pytae-2.2.2/requirements.txt +2 -0
- pytae-2.2.2/src/.ipynb_checkpoints/agg_df-checkpoint.ipynb +461 -0
- pytae-2.2.2/src/.ipynb_checkpoints/get_data-checkpoint.ipynb +241 -0
- pytae-2.2.2/src/.ipynb_checkpoints/shape-checkpoint.ipynb +224 -0
- pytae-2.2.2/src/agg_df.ipynb +461 -0
- pytae-2.2.2/src/get_data.ipynb +241 -0
- pytae-2.2.2/src/pytae/.ipynb_checkpoints/__init__-checkpoint.py +4 -0
- pytae-2.2.2/src/pytae/.ipynb_checkpoints/agg_df-checkpoint.py +53 -0
- pytae-2.2.2/src/pytae/.ipynb_checkpoints/extend_pandas-checkpoint.py +55 -0
- pytae-2.2.2/src/pytae/.ipynb_checkpoints/get_data-checkpoint.py +52 -0
- pytae-2.2.0/src/pytae/.ipynb_checkpoints/extend_pandas-checkpoint.py → pytae-2.2.2/src/pytae/.ipynb_checkpoints/shape-checkpoint.py +2 -111
- pytae-2.2.2/src/pytae/__init__.py +4 -0
- pytae-2.2.2/src/pytae/agg_df.py +53 -0
- pytae-2.2.2/src/pytae/extend_pandas.py +55 -0
- pytae-2.2.2/src/pytae/get_data.py +52 -0
- pytae-2.2.0/src/pytae/extend_pandas.py → pytae-2.2.2/src/pytae/shape.py +2 -111
- pytae-2.2.2/src/shape.ipynb +221 -0
- pytae-2.2.0/.ipynb_checkpoints/requirements-checkpoint.txt +0 -3
- pytae-2.2.0/requirements.txt +0 -3
- pytae-2.2.0/src/.ipynb_checkpoints/recon-checkpoint.ipynb +0 -855
- pytae-2.2.0/src/pytae/.ipynb_checkpoints/__init__-checkpoint.py +0 -3
- pytae-2.2.0/src/pytae/.ipynb_checkpoints/general_utils-checkpoint.py +0 -279
- pytae-2.2.0/src/pytae/.ipynb_checkpoints/reconciller-checkpoint.py +0 -103
- pytae-2.2.0/src/pytae/__init__.py +0 -3
- pytae-2.2.0/src/pytae/general_utils.py +0 -279
- pytae-2.2.0/src/pytae/reconciller.py +0 -103
- pytae-2.2.0/src/recon.ipynb +0 -867
- {pytae-2.2.0 → pytae-2.2.2}/.github/workflows/publish-to-test-pypi.yml +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/.gitignore +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/.ipynb_checkpoints/LICENSE-checkpoint +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/.ipynb_checkpoints/README-checkpoint.md +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/LICENSE +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/README.md +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/src/.ipynb_checkpoints/other_examples-checkpoint.ipynb +0 -0
- {pytae-2.2.0 → pytae-2.2.2}/src/other_examples.ipynb +0 -0
|
@@ -0,0 +1,461 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": 22,
|
|
6
|
+
"id": "e1e35300-a92f-47dd-b448-83861e79eedf",
|
|
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": 19,
|
|
19
|
+
"id": "c3f73408-8dc7-4ea5-899b-e3b23a692cd8",
|
|
20
|
+
"metadata": {},
|
|
21
|
+
"outputs": [],
|
|
22
|
+
"source": [
|
|
23
|
+
"df=pd.DataFrame({'id':['a','b','c','d','e','','f','f'],\n",
|
|
24
|
+
" 'balance':[10,20,0,21,15,10,20,25],\n",
|
|
25
|
+
" 'country':['sg','cn','ca','np','in','in','np','in']})"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"cell_type": "code",
|
|
30
|
+
"execution_count": 20,
|
|
31
|
+
"id": "db20c1c7-c11f-431d-ae9c-d0c424f0d423",
|
|
32
|
+
"metadata": {},
|
|
33
|
+
"outputs": [
|
|
34
|
+
{
|
|
35
|
+
"data": {
|
|
36
|
+
"text/html": [
|
|
37
|
+
"<div>\n",
|
|
38
|
+
"<style scoped>\n",
|
|
39
|
+
" .dataframe tbody tr th:only-of-type {\n",
|
|
40
|
+
" vertical-align: middle;\n",
|
|
41
|
+
" }\n",
|
|
42
|
+
"\n",
|
|
43
|
+
" .dataframe tbody tr th {\n",
|
|
44
|
+
" vertical-align: top;\n",
|
|
45
|
+
" }\n",
|
|
46
|
+
"\n",
|
|
47
|
+
" .dataframe thead th {\n",
|
|
48
|
+
" text-align: right;\n",
|
|
49
|
+
" }\n",
|
|
50
|
+
"</style>\n",
|
|
51
|
+
"<table border=\"1\" class=\"dataframe\">\n",
|
|
52
|
+
" <thead>\n",
|
|
53
|
+
" <tr style=\"text-align: right;\">\n",
|
|
54
|
+
" <th></th>\n",
|
|
55
|
+
" <th>id</th>\n",
|
|
56
|
+
" <th>balance_sum</th>\n",
|
|
57
|
+
" <th>balance_min</th>\n",
|
|
58
|
+
" <th>balance_mean</th>\n",
|
|
59
|
+
" <th>balance_max</th>\n",
|
|
60
|
+
" <th>n</th>\n",
|
|
61
|
+
" </tr>\n",
|
|
62
|
+
" </thead>\n",
|
|
63
|
+
" <tbody>\n",
|
|
64
|
+
" <tr>\n",
|
|
65
|
+
" <th>0</th>\n",
|
|
66
|
+
" <td></td>\n",
|
|
67
|
+
" <td>10</td>\n",
|
|
68
|
+
" <td>10</td>\n",
|
|
69
|
+
" <td>10.0</td>\n",
|
|
70
|
+
" <td>10</td>\n",
|
|
71
|
+
" <td>1</td>\n",
|
|
72
|
+
" </tr>\n",
|
|
73
|
+
" <tr>\n",
|
|
74
|
+
" <th>1</th>\n",
|
|
75
|
+
" <td>a</td>\n",
|
|
76
|
+
" <td>10</td>\n",
|
|
77
|
+
" <td>10</td>\n",
|
|
78
|
+
" <td>10.0</td>\n",
|
|
79
|
+
" <td>10</td>\n",
|
|
80
|
+
" <td>1</td>\n",
|
|
81
|
+
" </tr>\n",
|
|
82
|
+
" <tr>\n",
|
|
83
|
+
" <th>2</th>\n",
|
|
84
|
+
" <td>b</td>\n",
|
|
85
|
+
" <td>20</td>\n",
|
|
86
|
+
" <td>20</td>\n",
|
|
87
|
+
" <td>20.0</td>\n",
|
|
88
|
+
" <td>20</td>\n",
|
|
89
|
+
" <td>1</td>\n",
|
|
90
|
+
" </tr>\n",
|
|
91
|
+
" <tr>\n",
|
|
92
|
+
" <th>3</th>\n",
|
|
93
|
+
" <td>c</td>\n",
|
|
94
|
+
" <td>0</td>\n",
|
|
95
|
+
" <td>0</td>\n",
|
|
96
|
+
" <td>0.0</td>\n",
|
|
97
|
+
" <td>0</td>\n",
|
|
98
|
+
" <td>1</td>\n",
|
|
99
|
+
" </tr>\n",
|
|
100
|
+
" <tr>\n",
|
|
101
|
+
" <th>4</th>\n",
|
|
102
|
+
" <td>d</td>\n",
|
|
103
|
+
" <td>21</td>\n",
|
|
104
|
+
" <td>21</td>\n",
|
|
105
|
+
" <td>21.0</td>\n",
|
|
106
|
+
" <td>21</td>\n",
|
|
107
|
+
" <td>1</td>\n",
|
|
108
|
+
" </tr>\n",
|
|
109
|
+
" <tr>\n",
|
|
110
|
+
" <th>5</th>\n",
|
|
111
|
+
" <td>e</td>\n",
|
|
112
|
+
" <td>15</td>\n",
|
|
113
|
+
" <td>15</td>\n",
|
|
114
|
+
" <td>15.0</td>\n",
|
|
115
|
+
" <td>15</td>\n",
|
|
116
|
+
" <td>1</td>\n",
|
|
117
|
+
" </tr>\n",
|
|
118
|
+
" <tr>\n",
|
|
119
|
+
" <th>6</th>\n",
|
|
120
|
+
" <td>f</td>\n",
|
|
121
|
+
" <td>45</td>\n",
|
|
122
|
+
" <td>20</td>\n",
|
|
123
|
+
" <td>22.5</td>\n",
|
|
124
|
+
" <td>25</td>\n",
|
|
125
|
+
" <td>2</td>\n",
|
|
126
|
+
" </tr>\n",
|
|
127
|
+
" </tbody>\n",
|
|
128
|
+
"</table>\n",
|
|
129
|
+
"</div>"
|
|
130
|
+
],
|
|
131
|
+
"text/plain": [
|
|
132
|
+
" id balance_sum balance_min balance_mean balance_max n\n",
|
|
133
|
+
"0 10 10 10.0 10 1\n",
|
|
134
|
+
"1 a 10 10 10.0 10 1\n",
|
|
135
|
+
"2 b 20 20 20.0 20 1\n",
|
|
136
|
+
"3 c 0 0 0.0 0 1\n",
|
|
137
|
+
"4 d 21 21 21.0 21 1\n",
|
|
138
|
+
"5 e 15 15 15.0 15 1\n",
|
|
139
|
+
"6 f 45 20 22.5 25 2"
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
"execution_count": 20,
|
|
143
|
+
"metadata": {},
|
|
144
|
+
"output_type": "execute_result"
|
|
145
|
+
}
|
|
146
|
+
],
|
|
147
|
+
"source": [
|
|
148
|
+
"df[['id','balance']].agg_df(type=['sum','min','mean','min','max','n'])"
|
|
149
|
+
]
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
"cell_type": "code",
|
|
153
|
+
"execution_count": 32,
|
|
154
|
+
"id": "66cb16ac-30b8-491e-94b4-0a2065d1e29b",
|
|
155
|
+
"metadata": {},
|
|
156
|
+
"outputs": [
|
|
157
|
+
{
|
|
158
|
+
"data": {
|
|
159
|
+
"text/html": [
|
|
160
|
+
"<div>\n",
|
|
161
|
+
"<style scoped>\n",
|
|
162
|
+
" .dataframe tbody tr th:only-of-type {\n",
|
|
163
|
+
" vertical-align: middle;\n",
|
|
164
|
+
" }\n",
|
|
165
|
+
"\n",
|
|
166
|
+
" .dataframe tbody tr th {\n",
|
|
167
|
+
" vertical-align: top;\n",
|
|
168
|
+
" }\n",
|
|
169
|
+
"\n",
|
|
170
|
+
" .dataframe thead th {\n",
|
|
171
|
+
" text-align: right;\n",
|
|
172
|
+
" }\n",
|
|
173
|
+
"</style>\n",
|
|
174
|
+
"<table border=\"1\" class=\"dataframe\">\n",
|
|
175
|
+
" <thead>\n",
|
|
176
|
+
" <tr style=\"text-align: right;\">\n",
|
|
177
|
+
" <th></th>\n",
|
|
178
|
+
" <th>id</th>\n",
|
|
179
|
+
" <th>balance_sum</th>\n",
|
|
180
|
+
" </tr>\n",
|
|
181
|
+
" </thead>\n",
|
|
182
|
+
" <tbody>\n",
|
|
183
|
+
" <tr>\n",
|
|
184
|
+
" <th>0</th>\n",
|
|
185
|
+
" <td></td>\n",
|
|
186
|
+
" <td>10</td>\n",
|
|
187
|
+
" </tr>\n",
|
|
188
|
+
" <tr>\n",
|
|
189
|
+
" <th>1</th>\n",
|
|
190
|
+
" <td>a</td>\n",
|
|
191
|
+
" <td>10</td>\n",
|
|
192
|
+
" </tr>\n",
|
|
193
|
+
" <tr>\n",
|
|
194
|
+
" <th>2</th>\n",
|
|
195
|
+
" <td>b</td>\n",
|
|
196
|
+
" <td>20</td>\n",
|
|
197
|
+
" </tr>\n",
|
|
198
|
+
" <tr>\n",
|
|
199
|
+
" <th>3</th>\n",
|
|
200
|
+
" <td>c</td>\n",
|
|
201
|
+
" <td>0</td>\n",
|
|
202
|
+
" </tr>\n",
|
|
203
|
+
" <tr>\n",
|
|
204
|
+
" <th>4</th>\n",
|
|
205
|
+
" <td>d</td>\n",
|
|
206
|
+
" <td>21</td>\n",
|
|
207
|
+
" </tr>\n",
|
|
208
|
+
" <tr>\n",
|
|
209
|
+
" <th>5</th>\n",
|
|
210
|
+
" <td>e</td>\n",
|
|
211
|
+
" <td>15</td>\n",
|
|
212
|
+
" </tr>\n",
|
|
213
|
+
" <tr>\n",
|
|
214
|
+
" <th>6</th>\n",
|
|
215
|
+
" <td>f</td>\n",
|
|
216
|
+
" <td>45</td>\n",
|
|
217
|
+
" </tr>\n",
|
|
218
|
+
" </tbody>\n",
|
|
219
|
+
"</table>\n",
|
|
220
|
+
"</div>"
|
|
221
|
+
],
|
|
222
|
+
"text/plain": [
|
|
223
|
+
" id balance_sum\n",
|
|
224
|
+
"0 10\n",
|
|
225
|
+
"1 a 10\n",
|
|
226
|
+
"2 b 20\n",
|
|
227
|
+
"3 c 0\n",
|
|
228
|
+
"4 d 21\n",
|
|
229
|
+
"5 e 15\n",
|
|
230
|
+
"6 f 45"
|
|
231
|
+
]
|
|
232
|
+
},
|
|
233
|
+
"execution_count": 32,
|
|
234
|
+
"metadata": {},
|
|
235
|
+
"output_type": "execute_result"
|
|
236
|
+
}
|
|
237
|
+
],
|
|
238
|
+
"source": [
|
|
239
|
+
"df[['id','balance']].agg_df()\n",
|
|
240
|
+
"# df[['id','balance']].agg_df() by default is returning sum; \n",
|
|
241
|
+
"# to do: allow it to also work like this df[['id','balance']].agg_df('mean') i.e. passing string instead of a list"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
{
|
|
245
|
+
"cell_type": "code",
|
|
246
|
+
"execution_count": 23,
|
|
247
|
+
"id": "cbf32f4b-5f41-4ea7-bfa4-9f884d714f31",
|
|
248
|
+
"metadata": {},
|
|
249
|
+
"outputs": [
|
|
250
|
+
{
|
|
251
|
+
"data": {
|
|
252
|
+
"text/html": [
|
|
253
|
+
"<div>\n",
|
|
254
|
+
"<style scoped>\n",
|
|
255
|
+
" .dataframe tbody tr th:only-of-type {\n",
|
|
256
|
+
" vertical-align: middle;\n",
|
|
257
|
+
" }\n",
|
|
258
|
+
"\n",
|
|
259
|
+
" .dataframe tbody tr th {\n",
|
|
260
|
+
" vertical-align: top;\n",
|
|
261
|
+
" }\n",
|
|
262
|
+
"\n",
|
|
263
|
+
" .dataframe thead th {\n",
|
|
264
|
+
" text-align: right;\n",
|
|
265
|
+
" }\n",
|
|
266
|
+
"</style>\n",
|
|
267
|
+
"<table border=\"1\" class=\"dataframe\">\n",
|
|
268
|
+
" <thead>\n",
|
|
269
|
+
" <tr style=\"text-align: right;\">\n",
|
|
270
|
+
" <th></th>\n",
|
|
271
|
+
" <th>species</th>\n",
|
|
272
|
+
" <th>island</th>\n",
|
|
273
|
+
" <th>sex</th>\n",
|
|
274
|
+
" <th>n</th>\n",
|
|
275
|
+
" <th>bill_length_mm_sum</th>\n",
|
|
276
|
+
" <th>bill_depth_mm_sum</th>\n",
|
|
277
|
+
" <th>flipper_length_mm_sum</th>\n",
|
|
278
|
+
" <th>body_mass_g_sum</th>\n",
|
|
279
|
+
" </tr>\n",
|
|
280
|
+
" </thead>\n",
|
|
281
|
+
" <tbody>\n",
|
|
282
|
+
" <tr>\n",
|
|
283
|
+
" <th>0</th>\n",
|
|
284
|
+
" <td>Adelie</td>\n",
|
|
285
|
+
" <td>Biscoe</td>\n",
|
|
286
|
+
" <td>Female</td>\n",
|
|
287
|
+
" <td>22</td>\n",
|
|
288
|
+
" <td>821.9</td>\n",
|
|
289
|
+
" <td>389.5</td>\n",
|
|
290
|
+
" <td>4118.0</td>\n",
|
|
291
|
+
" <td>74125.0</td>\n",
|
|
292
|
+
" </tr>\n",
|
|
293
|
+
" <tr>\n",
|
|
294
|
+
" <th>1</th>\n",
|
|
295
|
+
" <td>Adelie</td>\n",
|
|
296
|
+
" <td>Biscoe</td>\n",
|
|
297
|
+
" <td>Male</td>\n",
|
|
298
|
+
" <td>22</td>\n",
|
|
299
|
+
" <td>893.0</td>\n",
|
|
300
|
+
" <td>418.8</td>\n",
|
|
301
|
+
" <td>4189.0</td>\n",
|
|
302
|
+
" <td>89100.0</td>\n",
|
|
303
|
+
" </tr>\n",
|
|
304
|
+
" <tr>\n",
|
|
305
|
+
" <th>2</th>\n",
|
|
306
|
+
" <td>Adelie</td>\n",
|
|
307
|
+
" <td>Dream</td>\n",
|
|
308
|
+
" <td>Female</td>\n",
|
|
309
|
+
" <td>27</td>\n",
|
|
310
|
+
" <td>996.6</td>\n",
|
|
311
|
+
" <td>475.7</td>\n",
|
|
312
|
+
" <td>5072.0</td>\n",
|
|
313
|
+
" <td>90300.0</td>\n",
|
|
314
|
+
" </tr>\n",
|
|
315
|
+
" <tr>\n",
|
|
316
|
+
" <th>3</th>\n",
|
|
317
|
+
" <td>Adelie</td>\n",
|
|
318
|
+
" <td>Dream</td>\n",
|
|
319
|
+
" <td>Male</td>\n",
|
|
320
|
+
" <td>28</td>\n",
|
|
321
|
+
" <td>1122.0</td>\n",
|
|
322
|
+
" <td>527.5</td>\n",
|
|
323
|
+
" <td>5374.0</td>\n",
|
|
324
|
+
" <td>113275.0</td>\n",
|
|
325
|
+
" </tr>\n",
|
|
326
|
+
" <tr>\n",
|
|
327
|
+
" <th>4</th>\n",
|
|
328
|
+
" <td>Adelie</td>\n",
|
|
329
|
+
" <td>Torgersen</td>\n",
|
|
330
|
+
" <td>Female</td>\n",
|
|
331
|
+
" <td>24</td>\n",
|
|
332
|
+
" <td>901.3</td>\n",
|
|
333
|
+
" <td>421.2</td>\n",
|
|
334
|
+
" <td>4519.0</td>\n",
|
|
335
|
+
" <td>81500.0</td>\n",
|
|
336
|
+
" </tr>\n",
|
|
337
|
+
" <tr>\n",
|
|
338
|
+
" <th>5</th>\n",
|
|
339
|
+
" <td>Adelie</td>\n",
|
|
340
|
+
" <td>Torgersen</td>\n",
|
|
341
|
+
" <td>Male</td>\n",
|
|
342
|
+
" <td>23</td>\n",
|
|
343
|
+
" <td>933.5</td>\n",
|
|
344
|
+
" <td>446.0</td>\n",
|
|
345
|
+
" <td>4483.0</td>\n",
|
|
346
|
+
" <td>92800.0</td>\n",
|
|
347
|
+
" </tr>\n",
|
|
348
|
+
" <tr>\n",
|
|
349
|
+
" <th>6</th>\n",
|
|
350
|
+
" <td>Chinstrap</td>\n",
|
|
351
|
+
" <td>Dream</td>\n",
|
|
352
|
+
" <td>Female</td>\n",
|
|
353
|
+
" <td>34</td>\n",
|
|
354
|
+
" <td>1583.5</td>\n",
|
|
355
|
+
" <td>598.0</td>\n",
|
|
356
|
+
" <td>6519.0</td>\n",
|
|
357
|
+
" <td>119925.0</td>\n",
|
|
358
|
+
" </tr>\n",
|
|
359
|
+
" <tr>\n",
|
|
360
|
+
" <th>7</th>\n",
|
|
361
|
+
" <td>Chinstrap</td>\n",
|
|
362
|
+
" <td>Dream</td>\n",
|
|
363
|
+
" <td>Male</td>\n",
|
|
364
|
+
" <td>34</td>\n",
|
|
365
|
+
" <td>1737.2</td>\n",
|
|
366
|
+
" <td>654.6</td>\n",
|
|
367
|
+
" <td>6797.0</td>\n",
|
|
368
|
+
" <td>133925.0</td>\n",
|
|
369
|
+
" </tr>\n",
|
|
370
|
+
" <tr>\n",
|
|
371
|
+
" <th>8</th>\n",
|
|
372
|
+
" <td>Gentoo</td>\n",
|
|
373
|
+
" <td>Biscoe</td>\n",
|
|
374
|
+
" <td>Female</td>\n",
|
|
375
|
+
" <td>58</td>\n",
|
|
376
|
+
" <td>2642.7</td>\n",
|
|
377
|
+
" <td>825.8</td>\n",
|
|
378
|
+
" <td>12337.0</td>\n",
|
|
379
|
+
" <td>271425.0</td>\n",
|
|
380
|
+
" </tr>\n",
|
|
381
|
+
" <tr>\n",
|
|
382
|
+
" <th>9</th>\n",
|
|
383
|
+
" <td>Gentoo</td>\n",
|
|
384
|
+
" <td>Biscoe</td>\n",
|
|
385
|
+
" <td>Male</td>\n",
|
|
386
|
+
" <td>61</td>\n",
|
|
387
|
+
" <td>3017.9</td>\n",
|
|
388
|
+
" <td>958.8</td>\n",
|
|
389
|
+
" <td>13514.0</td>\n",
|
|
390
|
+
" <td>334575.0</td>\n",
|
|
391
|
+
" </tr>\n",
|
|
392
|
+
" </tbody>\n",
|
|
393
|
+
"</table>\n",
|
|
394
|
+
"</div>"
|
|
395
|
+
],
|
|
396
|
+
"text/plain": [
|
|
397
|
+
" species island sex n bill_length_mm_sum bill_depth_mm_sum \\\n",
|
|
398
|
+
"0 Adelie Biscoe Female 22 821.9 389.5 \n",
|
|
399
|
+
"1 Adelie Biscoe Male 22 893.0 418.8 \n",
|
|
400
|
+
"2 Adelie Dream Female 27 996.6 475.7 \n",
|
|
401
|
+
"3 Adelie Dream Male 28 1122.0 527.5 \n",
|
|
402
|
+
"4 Adelie Torgersen Female 24 901.3 421.2 \n",
|
|
403
|
+
"5 Adelie Torgersen Male 23 933.5 446.0 \n",
|
|
404
|
+
"6 Chinstrap Dream Female 34 1583.5 598.0 \n",
|
|
405
|
+
"7 Chinstrap Dream Male 34 1737.2 654.6 \n",
|
|
406
|
+
"8 Gentoo Biscoe Female 58 2642.7 825.8 \n",
|
|
407
|
+
"9 Gentoo Biscoe Male 61 3017.9 958.8 \n",
|
|
408
|
+
"\n",
|
|
409
|
+
" flipper_length_mm_sum body_mass_g_sum \n",
|
|
410
|
+
"0 4118.0 74125.0 \n",
|
|
411
|
+
"1 4189.0 89100.0 \n",
|
|
412
|
+
"2 5072.0 90300.0 \n",
|
|
413
|
+
"3 5374.0 113275.0 \n",
|
|
414
|
+
"4 4519.0 81500.0 \n",
|
|
415
|
+
"5 4483.0 92800.0 \n",
|
|
416
|
+
"6 6519.0 119925.0 \n",
|
|
417
|
+
"7 6797.0 133925.0 \n",
|
|
418
|
+
"8 12337.0 271425.0 \n",
|
|
419
|
+
"9 13514.0 334575.0 "
|
|
420
|
+
]
|
|
421
|
+
},
|
|
422
|
+
"execution_count": 23,
|
|
423
|
+
"metadata": {},
|
|
424
|
+
"output_type": "execute_result"
|
|
425
|
+
}
|
|
426
|
+
],
|
|
427
|
+
"source": [
|
|
428
|
+
"penguins.agg_df(type=['n','sum']) # notice n is not repeated"
|
|
429
|
+
]
|
|
430
|
+
},
|
|
431
|
+
{
|
|
432
|
+
"cell_type": "code",
|
|
433
|
+
"execution_count": null,
|
|
434
|
+
"id": "773cca3c-564a-4c3a-bfcf-12b5ddfa6683",
|
|
435
|
+
"metadata": {},
|
|
436
|
+
"outputs": [],
|
|
437
|
+
"source": []
|
|
438
|
+
}
|
|
439
|
+
],
|
|
440
|
+
"metadata": {
|
|
441
|
+
"kernelspec": {
|
|
442
|
+
"display_name": "py_env",
|
|
443
|
+
"language": "python",
|
|
444
|
+
"name": "py_env"
|
|
445
|
+
},
|
|
446
|
+
"language_info": {
|
|
447
|
+
"codemirror_mode": {
|
|
448
|
+
"name": "ipython",
|
|
449
|
+
"version": 3
|
|
450
|
+
},
|
|
451
|
+
"file_extension": ".py",
|
|
452
|
+
"mimetype": "text/x-python",
|
|
453
|
+
"name": "python",
|
|
454
|
+
"nbconvert_exporter": "python",
|
|
455
|
+
"pygments_lexer": "ipython3",
|
|
456
|
+
"version": "3.9.6"
|
|
457
|
+
}
|
|
458
|
+
},
|
|
459
|
+
"nbformat": 4,
|
|
460
|
+
"nbformat_minor": 5
|
|
461
|
+
}
|