pytae 2.2.6__tar.gz → 2.2.7__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.6 → pytae-2.2.7}/.ipynb_checkpoints/pyproject-checkpoint.toml +1 -1
- {pytae-2.2.6 → pytae-2.2.7}/PKG-INFO +1 -1
- {pytae-2.2.6 → pytae-2.2.7}/pyproject.toml +1 -1
- pytae-2.2.7/src/.ipynb_checkpoints/agg_df-checkpoint.ipynb +109 -0
- pytae-2.2.7/src/agg_df.ipynb +941 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/get_data.ipynb +42 -42
- {pytae-2.2.6 → pytae-2.2.7}/src/other_utilities.ipynb +8 -8
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/.ipynb_checkpoints/agg_df-checkpoint.py +17 -12
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/.ipynb_checkpoints/get_data-checkpoint.py +3 -2
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/.ipynb_checkpoints/other_utilities-checkpoint.py +3 -1
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/agg_df.py +17 -12
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/get_data.py +3 -2
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/other_utilities.py +3 -1
- {pytae-2.2.6 → pytae-2.2.7}/src/shape.ipynb +2 -2
- pytae-2.2.6/src/.ipynb_checkpoints/agg_df-checkpoint.ipynb +0 -461
- pytae-2.2.6/src/agg_df.ipynb +0 -461
- {pytae-2.2.6 → pytae-2.2.7}/.github/workflows/publish-to-test-pypi.yml +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/.gitignore +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/.ipynb_checkpoints/LICENSE-checkpoint +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/.ipynb_checkpoints/README-checkpoint.md +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/.ipynb_checkpoints/requirements-checkpoint.txt +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/LICENSE +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/README.md +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/requirements.txt +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/.ipynb_checkpoints/get_data-checkpoint.ipynb +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/.ipynb_checkpoints/other_utilities-checkpoint.ipynb +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/.ipynb_checkpoints/shape-checkpoint.ipynb +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/.ipynb_checkpoints/__init__-checkpoint.py +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/.ipynb_checkpoints/shape-checkpoint.py +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/__init__.py +0 -0
- {pytae-2.2.6 → pytae-2.2.7}/src/pytae/shape.py +0 -0
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": null,
|
|
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": null,
|
|
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": null,
|
|
31
|
+
"id": "db20c1c7-c11f-431d-ae9c-d0c424f0d423",
|
|
32
|
+
"metadata": {},
|
|
33
|
+
"outputs": [],
|
|
34
|
+
"source": [
|
|
35
|
+
"df.agg_df(aggfunc=['sum','min','mean','min','max','n'])"
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"cell_type": "code",
|
|
40
|
+
"execution_count": null,
|
|
41
|
+
"id": "66cb16ac-30b8-491e-94b4-0a2065d1e29b",
|
|
42
|
+
"metadata": {},
|
|
43
|
+
"outputs": [],
|
|
44
|
+
"source": [
|
|
45
|
+
"df[['id','balance']].agg_df(aggfunc=['sum'])"
|
|
46
|
+
]
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
"cell_type": "code",
|
|
50
|
+
"execution_count": null,
|
|
51
|
+
"id": "cbf32f4b-5f41-4ea7-bfa4-9f884d714f31",
|
|
52
|
+
"metadata": {},
|
|
53
|
+
"outputs": [],
|
|
54
|
+
"source": [
|
|
55
|
+
"penguins.agg_df(aggfunc=['max','sum','n'],dropna=True)\n",
|
|
56
|
+
"#notice n comes first."
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"cell_type": "code",
|
|
61
|
+
"execution_count": null,
|
|
62
|
+
"id": "8a7d5322-31ef-4e03-abfd-4220b12c2520",
|
|
63
|
+
"metadata": {},
|
|
64
|
+
"outputs": [],
|
|
65
|
+
"source": [
|
|
66
|
+
"penguins.group_n(group=['species',\t'island',\t'sex'],dropna=True)"
|
|
67
|
+
]
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"cell_type": "code",
|
|
71
|
+
"execution_count": null,
|
|
72
|
+
"id": "c3b6663b-a929-4c52-a857-3c2ae3d581c8",
|
|
73
|
+
"metadata": {},
|
|
74
|
+
"outputs": [],
|
|
75
|
+
"source": [
|
|
76
|
+
"penguins.group_n(group=['species',\t'island',\t'sex'],dropna=False)"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"cell_type": "code",
|
|
81
|
+
"execution_count": null,
|
|
82
|
+
"id": "9674126e-3807-4fa6-84da-2bda38306ceb",
|
|
83
|
+
"metadata": {},
|
|
84
|
+
"outputs": [],
|
|
85
|
+
"source": []
|
|
86
|
+
}
|
|
87
|
+
],
|
|
88
|
+
"metadata": {
|
|
89
|
+
"kernelspec": {
|
|
90
|
+
"display_name": "py_env",
|
|
91
|
+
"language": "python",
|
|
92
|
+
"name": "py_env"
|
|
93
|
+
},
|
|
94
|
+
"language_info": {
|
|
95
|
+
"codemirror_mode": {
|
|
96
|
+
"name": "ipython",
|
|
97
|
+
"version": 3
|
|
98
|
+
},
|
|
99
|
+
"file_extension": ".py",
|
|
100
|
+
"mimetype": "text/x-python",
|
|
101
|
+
"name": "python",
|
|
102
|
+
"nbconvert_exporter": "python",
|
|
103
|
+
"pygments_lexer": "ipython3",
|
|
104
|
+
"version": "3.9.6"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"nbformat": 4,
|
|
108
|
+
"nbformat_minor": 5
|
|
109
|
+
}
|