utilsds 0.1__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.
utilsds-0.1/PKG-INFO ADDED
@@ -0,0 +1,181 @@
1
+ Metadata-Version: 2.1
2
+ Name: utilsds
3
+ Version: 0.1
4
+ Summary: Solution for DS Team
5
+ Author: DS Team
6
+ Author-email: ds@sts.pl
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Requires-Python: >=3.11
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: aiohttp==3.9.5
13
+ Requires-Dist: aiohttp-retry==2.8.3
14
+ Requires-Dist: aiosignal==1.3.1
15
+ Requires-Dist: amqp==5.2.0
16
+ Requires-Dist: annotated-types==0.6.0
17
+ Requires-Dist: antlr4-python3-runtime==4.9.3
18
+ Requires-Dist: appdirs==1.4.4
19
+ Requires-Dist: appnope==0.1.4
20
+ Requires-Dist: asttokens==2.4.1
21
+ Requires-Dist: asyncssh==2.14.2
22
+ Requires-Dist: atpublic==4.1.0
23
+ Requires-Dist: attrs==23.2.0
24
+ Requires-Dist: billiard==4.2.0
25
+ Requires-Dist: boto==2.49.0
26
+ Requires-Dist: cachetools==5.3.3
27
+ Requires-Dist: celery==5.4.0
28
+ Requires-Dist: certifi==2024.2.2
29
+ Requires-Dist: cffi==1.16.0
30
+ Requires-Dist: charset-normalizer==3.3.2
31
+ Requires-Dist: click==8.1.7
32
+ Requires-Dist: click-didyoumean==0.3.1
33
+ Requires-Dist: click-plugins==1.1.1
34
+ Requires-Dist: click-repl==0.3.0
35
+ Requires-Dist: cloudpickle==3.0.0
36
+ Requires-Dist: colorama==0.4.6
37
+ Requires-Dist: comm==0.2.2
38
+ Requires-Dist: configobj==5.0.8
39
+ Requires-Dist: contourpy==1.2.1
40
+ Requires-Dist: cryptography==42.0.7
41
+ Requires-Dist: cycler==0.12.1
42
+ Requires-Dist: db-dtypes==1.2.0
43
+ Requires-Dist: debugpy==1.8.1
44
+ Requires-Dist: decorator==5.1.1
45
+ Requires-Dist: dictdiffer==0.9.0
46
+ Requires-Dist: diskcache==5.6.3
47
+ Requires-Dist: distro==1.9.0
48
+ Requires-Dist: docstring_parser==0.16
49
+ Requires-Dist: dpath==2.1.6
50
+ Requires-Dist: ds_utils==0.4.1
51
+ Requires-Dist: dulwich==0.22.1
52
+ Requires-Dist: dvc==3.50.2
53
+ Requires-Dist: dvc-data==3.15.1
54
+ Requires-Dist: dvc-gs==3.0.1
55
+ Requires-Dist: dvc-http==2.32.0
56
+ Requires-Dist: dvc-objects==5.1.0
57
+ Requires-Dist: dvc-render==1.0.2
58
+ Requires-Dist: dvc-studio-client==0.20.0
59
+ Requires-Dist: dvc-task==0.4.0
60
+ Requires-Dist: entrypoints==0.4
61
+ Requires-Dist: executing==2.0.1
62
+ Requires-Dist: filelock==3.14.0
63
+ Requires-Dist: flatten-dict==0.4.2
64
+ Requires-Dist: flufl.lock==7.1.1
65
+ Requires-Dist: fonttools==4.51.0
66
+ Requires-Dist: frozenlist==1.4.1
67
+ Requires-Dist: fsspec==2024.5.0
68
+ Requires-Dist: funcy==2.0
69
+ Requires-Dist: future==1.0.0
70
+ Requires-Dist: gcsfs==2024.5.0
71
+ Requires-Dist: gitdb==4.0.11
72
+ Requires-Dist: GitPython==3.1.43
73
+ Requires-Dist: google-api-core==2.19.0
74
+ Requires-Dist: google-auth==2.29.0
75
+ Requires-Dist: google-auth-oauthlib==1.2.0
76
+ Requires-Dist: google-cloud-aiplatform==1.51.0
77
+ Requires-Dist: google-cloud-bigquery==3.22.0
78
+ Requires-Dist: google-cloud-core==2.4.1
79
+ Requires-Dist: google-cloud-resource-manager==1.12.3
80
+ Requires-Dist: google-cloud-storage==2.16.0
81
+ Requires-Dist: google-crc32c==1.5.0
82
+ Requires-Dist: google-resumable-media==2.7.0
83
+ Requires-Dist: googleapis-common-protos==1.63.0
84
+ Requires-Dist: grandalf==0.8
85
+ Requires-Dist: grpc-google-iam-v1==0.13.0
86
+ Requires-Dist: grpcio==1.63.0
87
+ Requires-Dist: grpcio-status==1.62.2
88
+ Requires-Dist: gto==1.7.1
89
+ Requires-Dist: hydra-core==1.3.2
90
+ Requires-Dist: hyperopt==0.2.7
91
+ Requires-Dist: idna==3.7
92
+ Requires-Dist: imbalanced-learn==0.12.2
93
+ Requires-Dist: ipykernel==6.29.4
94
+ Requires-Dist: ipython==8.24.0
95
+ Requires-Dist: iterative-telemetry==0.0.8
96
+ Requires-Dist: jedi==0.19.1
97
+ Requires-Dist: joblib==1.4.2
98
+ Requires-Dist: jupyter_client==8.6.1
99
+ Requires-Dist: jupyter_core==5.7.2
100
+ Requires-Dist: kiwisolver==1.4.5
101
+ Requires-Dist: kombu==5.3.7
102
+ Requires-Dist: markdown-it-py==3.0.0
103
+ Requires-Dist: matplotlib==3.9.0
104
+ Requires-Dist: matplotlib-inline==0.1.7
105
+ Requires-Dist: mdurl==0.1.2
106
+ Requires-Dist: multidict==6.0.5
107
+ Requires-Dist: nest-asyncio==1.6.0
108
+ Requires-Dist: networkx==3.3
109
+ Requires-Dist: numpy==1.26.4
110
+ Requires-Dist: oauthlib==3.2.2
111
+ Requires-Dist: omegaconf==2.3.0
112
+ Requires-Dist: orjson==3.10.3
113
+ Requires-Dist: packaging==24.0
114
+ Requires-Dist: pandas==2.2.2
115
+ Requires-Dist: parso==0.8.4
116
+ Requires-Dist: pathspec==0.12.1
117
+ Requires-Dist: pexpect==4.9.0
118
+ Requires-Dist: phik==0.12.4
119
+ Requires-Dist: pillow==10.3.0
120
+ Requires-Dist: platformdirs==3.11.0
121
+ Requires-Dist: prompt-toolkit==3.0.43
122
+ Requires-Dist: proto-plus==1.23.0
123
+ Requires-Dist: protobuf==4.25.3
124
+ Requires-Dist: psutil==5.9.8
125
+ Requires-Dist: ptyprocess==0.7.0
126
+ Requires-Dist: pure-eval==0.2.2
127
+ Requires-Dist: py4j==0.10.9.7
128
+ Requires-Dist: pyarrow==16.1.0
129
+ Requires-Dist: pyasn1==0.6.0
130
+ Requires-Dist: pyasn1_modules==0.4.0
131
+ Requires-Dist: pycparser==2.22
132
+ Requires-Dist: pydantic==2.7.1
133
+ Requires-Dist: pydantic_core==2.18.2
134
+ Requires-Dist: pydot==2.0.0
135
+ Requires-Dist: pygit2==1.14.1
136
+ Requires-Dist: Pygments==2.18.0
137
+ Requires-Dist: pygtrie==2.5.0
138
+ Requires-Dist: pyparsing==3.1.2
139
+ Requires-Dist: python-dateutil==2.9.0.post0
140
+ Requires-Dist: pytz==2024.1
141
+ Requires-Dist: PyYAML==6.0.1
142
+ Requires-Dist: pyzmq==26.0.3
143
+ Requires-Dist: requests==2.31.0
144
+ Requires-Dist: requests-oauthlib==2.0.0
145
+ Requires-Dist: rich==13.7.1
146
+ Requires-Dist: rsa==4.9
147
+ Requires-Dist: ruamel.yaml==0.18.6
148
+ Requires-Dist: ruamel.yaml.clib==0.2.8
149
+ Requires-Dist: scikit-learn==1.4.2
150
+ Requires-Dist: scipy==1.13.0
151
+ Requires-Dist: scmrepo==3.3.3
152
+ Requires-Dist: seaborn==0.13.2
153
+ Requires-Dist: semver==3.0.2
154
+ Requires-Dist: shapely==2.0.4
155
+ Requires-Dist: shellingham==1.5.4
156
+ Requires-Dist: shortuuid==1.0.13
157
+ Requires-Dist: shtab==1.7.1
158
+ Requires-Dist: six==1.16.0
159
+ Requires-Dist: smmap==5.0.1
160
+ Requires-Dist: sqltrie==0.11.0
161
+ Requires-Dist: stack-data==0.6.3
162
+ Requires-Dist: tabulate==0.9.0
163
+ Requires-Dist: threadpoolctl==3.5.0
164
+ Requires-Dist: tomlkit==0.12.5
165
+ Requires-Dist: tornado==6.4
166
+ Requires-Dist: tqdm==4.66.4
167
+ Requires-Dist: traitlets==5.14.3
168
+ Requires-Dist: typer==0.12.3
169
+ Requires-Dist: typing_extensions==4.11.0
170
+ Requires-Dist: tzdata==2024.1
171
+ Requires-Dist: urllib3==2.2.1
172
+ Requires-Dist: vine==5.1.0
173
+ Requires-Dist: voluptuous==0.14.2
174
+ Requires-Dist: wcwidth==0.2.13
175
+ Requires-Dist: yarl==1.9.4
176
+ Requires-Dist: yellowbrick==1.5
177
+ Requires-Dist: zc.lockfile==3.0.post1
178
+
179
+ # utils
180
+
181
+ Solution includes classes and function used in ds project.
utilsds-0.1/README.md ADDED
@@ -0,0 +1,3 @@
1
+ # utils
2
+
3
+ Solution includes classes and function used in ds project.
utilsds-0.1/setup.cfg ADDED
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
utilsds-0.1/setup.py ADDED
@@ -0,0 +1,186 @@
1
+ from setuptools import setup, find_packages
2
+
3
+ setup(
4
+ name='utilsds',
5
+ version='0.1',
6
+ packages=find_packages(),
7
+ install_requires=[
8
+ 'aiohttp==3.9.5',
9
+ 'aiohttp-retry==2.8.3',
10
+ 'aiosignal==1.3.1',
11
+ 'amqp==5.2.0',
12
+ 'annotated-types==0.6.0',
13
+ 'antlr4-python3-runtime==4.9.3',
14
+ 'appdirs==1.4.4',
15
+ 'appnope==0.1.4',
16
+ 'asttokens==2.4.1',
17
+ 'asyncssh==2.14.2',
18
+ 'atpublic==4.1.0',
19
+ 'attrs==23.2.0',
20
+ 'billiard==4.2.0',
21
+ 'boto==2.49.0',
22
+ 'cachetools==5.3.3',
23
+ 'celery==5.4.0',
24
+ 'certifi==2024.2.2',
25
+ 'cffi==1.16.0',
26
+ 'charset-normalizer==3.3.2',
27
+ 'click==8.1.7',
28
+ 'click-didyoumean==0.3.1',
29
+ 'click-plugins==1.1.1',
30
+ 'click-repl==0.3.0',
31
+ 'cloudpickle==3.0.0',
32
+ 'colorama==0.4.6',
33
+ 'comm==0.2.2',
34
+ 'configobj==5.0.8',
35
+ 'contourpy==1.2.1',
36
+ 'cryptography==42.0.7',
37
+ 'cycler==0.12.1',
38
+ 'db-dtypes==1.2.0',
39
+ 'debugpy==1.8.1',
40
+ 'decorator==5.1.1',
41
+ 'dictdiffer==0.9.0',
42
+ 'diskcache==5.6.3',
43
+ 'distro==1.9.0',
44
+ 'docstring_parser==0.16',
45
+ 'dpath==2.1.6',
46
+ 'ds_utils==0.4.1',
47
+ 'dulwich==0.22.1',
48
+ 'dvc==3.50.2',
49
+ 'dvc-data==3.15.1',
50
+ 'dvc-gs==3.0.1',
51
+ 'dvc-http==2.32.0',
52
+ 'dvc-objects==5.1.0',
53
+ 'dvc-render==1.0.2',
54
+ 'dvc-studio-client==0.20.0',
55
+ 'dvc-task==0.4.0',
56
+ 'entrypoints==0.4',
57
+ 'executing==2.0.1',
58
+ 'filelock==3.14.0',
59
+ 'flatten-dict==0.4.2',
60
+ 'flufl.lock==7.1.1',
61
+ 'fonttools==4.51.0',
62
+ 'frozenlist==1.4.1',
63
+ 'fsspec==2024.5.0',
64
+ 'funcy==2.0',
65
+ 'future==1.0.0',
66
+ 'gcsfs==2024.5.0',
67
+ 'gitdb==4.0.11',
68
+ 'GitPython==3.1.43',
69
+ 'google-api-core==2.19.0',
70
+ 'google-auth==2.29.0',
71
+ 'google-auth-oauthlib==1.2.0',
72
+ 'google-cloud-aiplatform==1.51.0',
73
+ 'google-cloud-bigquery==3.22.0',
74
+ 'google-cloud-core==2.4.1',
75
+ 'google-cloud-resource-manager==1.12.3',
76
+ 'google-cloud-storage==2.16.0',
77
+ 'google-crc32c==1.5.0',
78
+ 'google-resumable-media==2.7.0',
79
+ 'googleapis-common-protos==1.63.0',
80
+ 'grandalf==0.8',
81
+ 'grpc-google-iam-v1==0.13.0',
82
+ 'grpcio==1.63.0',
83
+ 'grpcio-status==1.62.2',
84
+ 'gto==1.7.1',
85
+ 'hydra-core==1.3.2',
86
+ 'hyperopt==0.2.7',
87
+ 'idna==3.7',
88
+ 'imbalanced-learn==0.12.2',
89
+ 'ipykernel==6.29.4',
90
+ 'ipython==8.24.0',
91
+ 'iterative-telemetry==0.0.8',
92
+ 'jedi==0.19.1',
93
+ 'joblib==1.4.2',
94
+ 'jupyter_client==8.6.1',
95
+ 'jupyter_core==5.7.2',
96
+ 'kiwisolver==1.4.5',
97
+ 'kombu==5.3.7',
98
+ 'markdown-it-py==3.0.0',
99
+ 'matplotlib==3.9.0',
100
+ 'matplotlib-inline==0.1.7',
101
+ 'mdurl==0.1.2',
102
+ 'multidict==6.0.5',
103
+ 'nest-asyncio==1.6.0',
104
+ 'networkx==3.3',
105
+ 'numpy==1.26.4',
106
+ 'oauthlib==3.2.2',
107
+ 'omegaconf==2.3.0',
108
+ 'orjson==3.10.3',
109
+ 'packaging==24.0',
110
+ 'pandas==2.2.2',
111
+ 'parso==0.8.4',
112
+ 'pathspec==0.12.1',
113
+ 'pexpect==4.9.0',
114
+ 'phik==0.12.4',
115
+ 'pillow==10.3.0',
116
+ 'platformdirs==3.11.0',
117
+ 'prompt-toolkit==3.0.43',
118
+ 'proto-plus==1.23.0',
119
+ 'protobuf==4.25.3',
120
+ 'psutil==5.9.8',
121
+ 'ptyprocess==0.7.0',
122
+ 'pure-eval==0.2.2',
123
+ 'py4j==0.10.9.7',
124
+ 'pyarrow==16.1.0',
125
+ 'pyasn1==0.6.0',
126
+ 'pyasn1_modules==0.4.0',
127
+ 'pycparser==2.22',
128
+ 'pydantic==2.7.1',
129
+ 'pydantic_core==2.18.2',
130
+ 'pydot==2.0.0',
131
+ 'pygit2==1.14.1',
132
+ 'Pygments==2.18.0',
133
+ 'pygtrie==2.5.0',
134
+ 'pyparsing==3.1.2',
135
+ 'python-dateutil==2.9.0.post0',
136
+ 'pytz==2024.1',
137
+ 'PyYAML==6.0.1',
138
+ 'pyzmq==26.0.3',
139
+ 'requests==2.31.0',
140
+ 'requests-oauthlib==2.0.0',
141
+ 'rich==13.7.1',
142
+ 'rsa==4.9',
143
+ 'ruamel.yaml==0.18.6',
144
+ 'ruamel.yaml.clib==0.2.8',
145
+ 'scikit-learn==1.4.2',
146
+ 'scipy==1.13.0',
147
+ 'scmrepo==3.3.3',
148
+ 'seaborn==0.13.2',
149
+ 'semver==3.0.2',
150
+ 'shapely==2.0.4',
151
+ 'shellingham==1.5.4',
152
+ 'shortuuid==1.0.13',
153
+ 'shtab==1.7.1',
154
+ 'six==1.16.0',
155
+ 'smmap==5.0.1',
156
+ 'sqltrie==0.11.0',
157
+ 'stack-data==0.6.3',
158
+ 'tabulate==0.9.0',
159
+ 'threadpoolctl==3.5.0',
160
+ 'tomlkit==0.12.5',
161
+ 'tornado==6.4',
162
+ 'tqdm==4.66.4',
163
+ 'traitlets==5.14.3',
164
+ 'typer==0.12.3',
165
+ 'typing_extensions==4.11.0',
166
+ 'tzdata==2024.1',
167
+ 'urllib3==2.2.1',
168
+ 'vine==5.1.0',
169
+ 'voluptuous==0.14.2',
170
+ 'wcwidth==0.2.13',
171
+ 'yarl==1.9.4',
172
+ 'yellowbrick==1.5',
173
+ 'zc.lockfile==3.0.post1',
174
+ ],
175
+ author='DS Team',
176
+ author_email='ds@sts.pl',
177
+ description='Solution for DS Team',
178
+ long_description=open('README.md').read(),
179
+ long_description_content_type='text/markdown',
180
+ classifiers=[
181
+ 'Programming Language :: Python :: 3',
182
+ 'License :: OSI Approved :: MIT License',
183
+ 'Operating System :: OS Independent',
184
+ ],
185
+ python_requires='>=3.11',
186
+ )
File without changes
@@ -0,0 +1,35 @@
1
+ '''
2
+ Statistics function
3
+ '''
4
+
5
+ from scipy import stats
6
+
7
+ def test_kruskal_wallis(*groups, variable, dataframe, alpha = 0.02, fill_na=0):
8
+ """
9
+ Statistical Kruskal-Wallis test.
10
+
11
+ Parameters
12
+ ----------
13
+
14
+ groups : packaging argument, pd.Dataframe
15
+ Dataframe with one of the target groups.
16
+ dataframe : pd.Dataframe
17
+ Dataframe with all target groups
18
+ alpha : float, optional
19
+ Statistical significance, by default 0.02
20
+ fill_na : int, optional
21
+ Fill empty rows, by default 0
22
+ """
23
+ krus_group = []
24
+ for group in groups:
25
+ group = group[variable].fillna(fill_na).to_list()
26
+ krus_group.append(group)
27
+ h_statistic, p_value = stats.kruskal(*krus_group)
28
+
29
+ print("Wartość H-statystyki:", h_statistic)
30
+ print("Wartość p-value:", p_value)
31
+
32
+ if p_value < alpha:
33
+ print("Odrzucamy hipotezę zerową - istnieje istotnie statystycznie różnice między przynajmniej jedną parą grup. Sprawdź poniższe mediany.")
34
+ return dataframe.groupby('category')[variable].median()
35
+ print("Nie ma podstaw do odrzucenia hipotezy zerowej - nie ma istotnych statystycznie różnic między grupami.")