complexifier 0.3.2__tar.gz → 0.3.4__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.
- {complexifier-0.3.2 → complexifier-0.3.4}/.github/workflows/main.yml +1 -2
- {complexifier-0.3.2 → complexifier-0.3.4}/.github/workflows/sphinx.yml +16 -0
- complexifier-0.3.4/.gitignore +238 -0
- complexifier-0.3.4/.readthedocs.yaml +32 -0
- {complexifier-0.3.2 → complexifier-0.3.4}/PKG-INFO +20 -4
- {complexifier-0.3.2 → complexifier-0.3.4}/README.md +17 -2
- complexifier-0.3.4/README.rst +118 -0
- complexifier-0.3.4/docs/.nojekyll +0 -0
- {complexifier-0.3.2 → complexifier-0.3.4}/docs/source/conf.py +13 -8
- complexifier-0.3.4/docs/source/index.rst +118 -0
- {complexifier-0.3.2 → complexifier-0.3.4}/pyproject.toml +1 -1
- complexifier-0.3.4/src/complexifier/__init__.py +11 -0
- complexifier-0.3.4/src/complexifier/conftest.py +4 -0
- complexifier-0.3.4/src/complexifier/main.py +420 -0
- complexifier-0.3.4/src/complexifier/test_add_sequential_anomaly.py +309 -0
- complexifier-0.3.4/src/complexifier/test_main.py +556 -0
- complexifier-0.3.4/src/complexifier/test_swap_dates.py +233 -0
- complexifier-0.3.2/.gitignore +0 -10
- complexifier-0.3.2/README.rst +0 -182
- complexifier-0.3.2/docs/source/index.rst +0 -207
- complexifier-0.3.2/src/complexifier/__init__.py +0 -1
- complexifier-0.3.2/src/complexifier/main.py +0 -285
- complexifier-0.3.2/src/complexifier/test_main.py +0 -283
- {complexifier-0.3.2 → complexifier-0.3.4}/LICENSE +0 -0
- {complexifier-0.3.2 → complexifier-0.3.4}/docs/Makefile +0 -0
- {complexifier-0.3.2 → complexifier-0.3.4}/docs/make.bat +0 -0
- {complexifier-0.3.2 → complexifier-0.3.4/docs/source}/assets/complexifier.jpeg +0 -0
|
@@ -11,13 +11,29 @@ jobs:
|
|
|
11
11
|
- uses: actions/checkout@v4
|
|
12
12
|
with:
|
|
13
13
|
persist-credentials: false
|
|
14
|
+
|
|
15
|
+
# - name: Set up Python
|
|
16
|
+
# uses: actions/setup-python@v4
|
|
17
|
+
# with:
|
|
18
|
+
# python-version: '3.x'
|
|
19
|
+
|
|
20
|
+
# - name: Install dependencies
|
|
21
|
+
# run: |
|
|
22
|
+
# python -m pip install --upgrade pip
|
|
23
|
+
# pip install -r requirements.txt
|
|
24
|
+
|
|
25
|
+
# - name: Check installed packages
|
|
26
|
+
# run: python -m pip list
|
|
27
|
+
|
|
14
28
|
- name: Build HTML
|
|
15
29
|
uses: ammaraskar/sphinx-action@master
|
|
30
|
+
|
|
16
31
|
- name: Upload artifacts
|
|
17
32
|
uses: actions/upload-artifact@v4
|
|
18
33
|
with:
|
|
19
34
|
name: html-docs
|
|
20
35
|
path: docs/build/html/
|
|
36
|
+
|
|
21
37
|
- name: Deploy
|
|
22
38
|
uses: peaceiris/actions-gh-pages@v3
|
|
23
39
|
if: github.ref == 'refs/heads/main'
|
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
.venv
|
|
2
|
+
venv
|
|
3
|
+
dist
|
|
4
|
+
*.txt
|
|
5
|
+
*.sh
|
|
6
|
+
__pycache__
|
|
7
|
+
testing.py
|
|
8
|
+
.coverage
|
|
9
|
+
.pytest_cache
|
|
10
|
+
docs/build
|
|
11
|
+
|
|
12
|
+
# Byte-compiled / optimized / DLL files
|
|
13
|
+
__pycache__/
|
|
14
|
+
*.py[codz]
|
|
15
|
+
*$py.class
|
|
16
|
+
|
|
17
|
+
# C extensions
|
|
18
|
+
*.so
|
|
19
|
+
|
|
20
|
+
# Distribution / packaging
|
|
21
|
+
.Python
|
|
22
|
+
build/
|
|
23
|
+
develop-eggs/
|
|
24
|
+
dist/
|
|
25
|
+
downloads/
|
|
26
|
+
eggs/
|
|
27
|
+
.eggs/
|
|
28
|
+
lib/
|
|
29
|
+
lib64/
|
|
30
|
+
parts/
|
|
31
|
+
sdist/
|
|
32
|
+
var/
|
|
33
|
+
wheels/
|
|
34
|
+
share/python-wheels/
|
|
35
|
+
*.egg-info/
|
|
36
|
+
.installed.cfg
|
|
37
|
+
*.egg
|
|
38
|
+
MANIFEST
|
|
39
|
+
|
|
40
|
+
# PyInstaller
|
|
41
|
+
# Usually these files are written by a python script from a template
|
|
42
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
43
|
+
*.manifest
|
|
44
|
+
*.spec
|
|
45
|
+
|
|
46
|
+
# Installer logs
|
|
47
|
+
pip-log.txt
|
|
48
|
+
pip-delete-this-directory.txt
|
|
49
|
+
|
|
50
|
+
# Unit test / coverage reports
|
|
51
|
+
htmlcov/
|
|
52
|
+
.tox/
|
|
53
|
+
.nox/
|
|
54
|
+
.coverage
|
|
55
|
+
.coverage.*
|
|
56
|
+
.cache
|
|
57
|
+
nosetests.xml
|
|
58
|
+
coverage.xml
|
|
59
|
+
*.cover
|
|
60
|
+
*.py.cover
|
|
61
|
+
*.lcov
|
|
62
|
+
.hypothesis/
|
|
63
|
+
.pytest_cache/
|
|
64
|
+
cover/
|
|
65
|
+
|
|
66
|
+
# Translations
|
|
67
|
+
*.mo
|
|
68
|
+
*.pot
|
|
69
|
+
|
|
70
|
+
# Django stuff:
|
|
71
|
+
*.log
|
|
72
|
+
local_settings.py
|
|
73
|
+
db.sqlite3
|
|
74
|
+
db.sqlite3-journal
|
|
75
|
+
db.sqlite3-wal
|
|
76
|
+
db.sqlite3-shm
|
|
77
|
+
|
|
78
|
+
# Flask stuff:
|
|
79
|
+
instance/
|
|
80
|
+
.webassets-cache
|
|
81
|
+
|
|
82
|
+
# Scrapy stuff:
|
|
83
|
+
.scrapy
|
|
84
|
+
|
|
85
|
+
# Sphinx documentation
|
|
86
|
+
docs/_build/
|
|
87
|
+
|
|
88
|
+
# PyBuilder
|
|
89
|
+
.pybuilder/
|
|
90
|
+
target/
|
|
91
|
+
|
|
92
|
+
# Jupyter Notebook
|
|
93
|
+
.ipynb_checkpoints
|
|
94
|
+
|
|
95
|
+
# IPython
|
|
96
|
+
profile_default/
|
|
97
|
+
ipython_config.py
|
|
98
|
+
|
|
99
|
+
# pyenv
|
|
100
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
101
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
102
|
+
# .python-version
|
|
103
|
+
|
|
104
|
+
# pipenv
|
|
105
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
106
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
107
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
108
|
+
# install all needed dependencies.
|
|
109
|
+
# Pipfile.lock
|
|
110
|
+
|
|
111
|
+
# uv
|
|
112
|
+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
113
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
114
|
+
# commonly ignored for libraries.
|
|
115
|
+
# uv.lock
|
|
116
|
+
|
|
117
|
+
# poetry
|
|
118
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
119
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
120
|
+
# commonly ignored for libraries.
|
|
121
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
122
|
+
# poetry.lock
|
|
123
|
+
# poetry.toml
|
|
124
|
+
|
|
125
|
+
# pdm
|
|
126
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
127
|
+
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
128
|
+
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
129
|
+
# pdm.lock
|
|
130
|
+
# pdm.toml
|
|
131
|
+
.pdm-python
|
|
132
|
+
.pdm-build/
|
|
133
|
+
|
|
134
|
+
# pixi
|
|
135
|
+
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
136
|
+
# pixi.lock
|
|
137
|
+
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
138
|
+
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
139
|
+
.pixi/*
|
|
140
|
+
!.pixi/config.toml
|
|
141
|
+
|
|
142
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
143
|
+
__pypackages__/
|
|
144
|
+
|
|
145
|
+
# Celery stuff
|
|
146
|
+
celerybeat-schedule*
|
|
147
|
+
celerybeat.pid
|
|
148
|
+
|
|
149
|
+
# Redis
|
|
150
|
+
*.rdb
|
|
151
|
+
*.aof
|
|
152
|
+
*.pid
|
|
153
|
+
|
|
154
|
+
# RabbitMQ
|
|
155
|
+
mnesia/
|
|
156
|
+
rabbitmq/
|
|
157
|
+
rabbitmq-data/
|
|
158
|
+
|
|
159
|
+
# ActiveMQ
|
|
160
|
+
activemq-data/
|
|
161
|
+
|
|
162
|
+
# SageMath parsed files
|
|
163
|
+
*.sage.py
|
|
164
|
+
|
|
165
|
+
# Environments
|
|
166
|
+
.env
|
|
167
|
+
.envrc
|
|
168
|
+
.venv
|
|
169
|
+
env/
|
|
170
|
+
venv/
|
|
171
|
+
ENV/
|
|
172
|
+
env.bak/
|
|
173
|
+
venv.bak/
|
|
174
|
+
|
|
175
|
+
# Conda environments
|
|
176
|
+
conda-meta/
|
|
177
|
+
|
|
178
|
+
# Spyder project settings
|
|
179
|
+
.spyderproject
|
|
180
|
+
.spyproject
|
|
181
|
+
|
|
182
|
+
# Rope project settings
|
|
183
|
+
.ropeproject
|
|
184
|
+
|
|
185
|
+
# mkdocs/Zensical documentation
|
|
186
|
+
/site
|
|
187
|
+
|
|
188
|
+
# mypy
|
|
189
|
+
.mypy_cache/
|
|
190
|
+
.dmypy.json
|
|
191
|
+
dmypy.json
|
|
192
|
+
|
|
193
|
+
# Pyre type checker
|
|
194
|
+
.pyre/
|
|
195
|
+
|
|
196
|
+
# pytype static type analyzer
|
|
197
|
+
.pytype/
|
|
198
|
+
|
|
199
|
+
# Cython debug symbols
|
|
200
|
+
cython_debug/
|
|
201
|
+
|
|
202
|
+
# PyCharm
|
|
203
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
204
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
206
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
207
|
+
# .idea/
|
|
208
|
+
|
|
209
|
+
# Abstra
|
|
210
|
+
# Abstra is an AI-powered process automation framework.
|
|
211
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
212
|
+
# Learn more at https://abstra.io/docs
|
|
213
|
+
.abstra/
|
|
214
|
+
|
|
215
|
+
# Visual Studio Code
|
|
216
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore that
|
|
217
|
+
# can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
218
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer, you
|
|
219
|
+
# could uncomment the following to ignore the entire vscode folder
|
|
220
|
+
# .vscode/
|
|
221
|
+
# Temporary file for partial code execution
|
|
222
|
+
tempCodeRunnerFile.py
|
|
223
|
+
|
|
224
|
+
# Ruff stuff:
|
|
225
|
+
.ruff_cache/
|
|
226
|
+
|
|
227
|
+
# PyPI configuration file
|
|
228
|
+
.pypirc
|
|
229
|
+
|
|
230
|
+
# Marimo
|
|
231
|
+
marimo/_static/
|
|
232
|
+
marimo/_lsp/
|
|
233
|
+
__marimo__/
|
|
234
|
+
|
|
235
|
+
# Streamlit
|
|
236
|
+
.streamlit/secrets.toml
|
|
237
|
+
|
|
238
|
+
**/.DS_Store
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# .readthedocs.yaml
|
|
2
|
+
# Read the Docs configuration file
|
|
3
|
+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
|
|
4
|
+
|
|
5
|
+
# Required
|
|
6
|
+
version: 2
|
|
7
|
+
|
|
8
|
+
# Set the OS, Python version and other tools you might need
|
|
9
|
+
build:
|
|
10
|
+
os: ubuntu-24.04
|
|
11
|
+
tools:
|
|
12
|
+
python: "3.13"
|
|
13
|
+
# You can also specify other tool versions:
|
|
14
|
+
# nodejs: "23"
|
|
15
|
+
# rust: "1.82"
|
|
16
|
+
# golang: "1.23"
|
|
17
|
+
|
|
18
|
+
# Build documentation in the "docs/" directory with Sphinx
|
|
19
|
+
sphinx:
|
|
20
|
+
configuration: docs/source/conf.py
|
|
21
|
+
|
|
22
|
+
# Optionally build your docs in additional formats such as PDF and ePub
|
|
23
|
+
# formats:
|
|
24
|
+
# - pdf
|
|
25
|
+
# - epub
|
|
26
|
+
|
|
27
|
+
# Optional but recommended, declare the Python requirements required
|
|
28
|
+
# to build your documentation
|
|
29
|
+
# See https://docs.readthedocs.io/en/stable/guides/reproducible-builds.html
|
|
30
|
+
python:
|
|
31
|
+
install:
|
|
32
|
+
- requirements: docs/requirements.txt
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
2
|
Name: complexifier
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.4
|
|
4
4
|
Summary: A library to make data worse
|
|
5
5
|
Project-URL: Homepage, https://github.com/ruyzambrano/complexifier
|
|
6
6
|
Project-URL: Issues, https://github.com/ruyzambrano/complexifier/issues
|
|
7
7
|
Author-email: Ruy Zambrano <ruyzambrano@gmail.com>
|
|
8
|
+
License-File: LICENSE
|
|
8
9
|
Classifier: License :: OSI Approved :: MIT License
|
|
9
10
|
Classifier: Operating System :: OS Independent
|
|
10
11
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -40,10 +41,13 @@ Complexifier solves this problem by allowing you take the former and turn it int
|
|
|
40
41
|
pip install complexifier
|
|
41
42
|
```
|
|
42
43
|
|
|
43
|
-
##
|
|
44
|
+
## Documentation
|
|
44
45
|
|
|
45
46
|
[Go to the documentation](https://ruyzambrano.github.io/complexifier/)
|
|
46
47
|
|
|
48
|
+
## Usage
|
|
49
|
+
|
|
50
|
+
|
|
47
51
|
Once installed you can use `complexifier` to add mistakes and outliers to your data
|
|
48
52
|
|
|
49
53
|
This library has several methods available:
|
|
@@ -84,8 +88,20 @@ Introduces duplicate rows into a DataFrame. This function is useful for testing
|
|
|
84
88
|
|
|
85
89
|
Inserts null values into specified DataFrame columns. This simulates missing data conditions.
|
|
86
90
|
|
|
91
|
+
### swap_dates
|
|
92
|
+
|
|
93
|
+
`swap_dates(df: pd.DataFrame, columns=None, sample_size: int = None) -> pd.DataFrame`
|
|
94
|
+
|
|
95
|
+
Introduces date errors by swapping month and day positions in datetime columns. Randomly selects rows and swaps the month and day for those where the day value is <= 12 (e.g., 2024-01-03 becomes 2024-03-01).
|
|
96
|
+
|
|
97
|
+
### add_sequential_anomaly
|
|
98
|
+
|
|
99
|
+
`add_sequential_anomaly(df: pd.DataFrame, sequence_size: int = 10, magnitude: int = 3, columns=None, direction: str = 'positive') -> pd.DataFrame`
|
|
100
|
+
|
|
101
|
+
Introduces a sequential anomaly into the DataFrame by uniformly adjusting a series of consecutive data points in numeric columns by the column's standard deviation multiplied by the magnitude.
|
|
102
|
+
|
|
87
103
|
### mess_it_up
|
|
88
104
|
|
|
89
|
-
`mess_it_up(df: pd.DataFrame, columns=None, min_std=1, max_std=5, sample_size=None,min_percent=1, max_percent=10, introduce_spag=True, add_outliers=True, add_std=True, duplicate=True, add_null=True) -> pd.DataFrame`
|
|
105
|
+
`mess_it_up(df: pd.DataFrame, columns=None, min_std=1, max_std=5, sample_size=None, min_percent=1, max_percent=10, introduce_spag=True, add_outliers=True, add_std=True, duplicate=True, add_null=True, swap_date=True, sequential_anomaly=True, sequence_size=10, magnitude=3, direction='positive') -> pd.DataFrame`
|
|
90
106
|
|
|
91
107
|
Adds all (or some) of the above methods. Really messes it up.
|
|
@@ -27,10 +27,13 @@ Complexifier solves this problem by allowing you take the former and turn it int
|
|
|
27
27
|
pip install complexifier
|
|
28
28
|
```
|
|
29
29
|
|
|
30
|
-
##
|
|
30
|
+
## Documentation
|
|
31
31
|
|
|
32
32
|
[Go to the documentation](https://ruyzambrano.github.io/complexifier/)
|
|
33
33
|
|
|
34
|
+
## Usage
|
|
35
|
+
|
|
36
|
+
|
|
34
37
|
Once installed you can use `complexifier` to add mistakes and outliers to your data
|
|
35
38
|
|
|
36
39
|
This library has several methods available:
|
|
@@ -71,8 +74,20 @@ Introduces duplicate rows into a DataFrame. This function is useful for testing
|
|
|
71
74
|
|
|
72
75
|
Inserts null values into specified DataFrame columns. This simulates missing data conditions.
|
|
73
76
|
|
|
77
|
+
### swap_dates
|
|
78
|
+
|
|
79
|
+
`swap_dates(df: pd.DataFrame, columns=None, sample_size: int = None) -> pd.DataFrame`
|
|
80
|
+
|
|
81
|
+
Introduces date errors by swapping month and day positions in datetime columns. Randomly selects rows and swaps the month and day for those where the day value is <= 12 (e.g., 2024-01-03 becomes 2024-03-01).
|
|
82
|
+
|
|
83
|
+
### add_sequential_anomaly
|
|
84
|
+
|
|
85
|
+
`add_sequential_anomaly(df: pd.DataFrame, sequence_size: int = 10, magnitude: int = 3, columns=None, direction: str = 'positive') -> pd.DataFrame`
|
|
86
|
+
|
|
87
|
+
Introduces a sequential anomaly into the DataFrame by uniformly adjusting a series of consecutive data points in numeric columns by the column's standard deviation multiplied by the magnitude.
|
|
88
|
+
|
|
74
89
|
### mess_it_up
|
|
75
90
|
|
|
76
|
-
`mess_it_up(df: pd.DataFrame, columns=None, min_std=1, max_std=5, sample_size=None,min_percent=1, max_percent=10, introduce_spag=True, add_outliers=True, add_std=True, duplicate=True, add_null=True) -> pd.DataFrame`
|
|
91
|
+
`mess_it_up(df: pd.DataFrame, columns=None, min_std=1, max_std=5, sample_size=None, min_percent=1, max_percent=10, introduce_spag=True, add_outliers=True, add_std=True, duplicate=True, add_null=True, swap_date=True, sequential_anomaly=True, sequence_size=10, magnitude=3, direction='positive') -> pd.DataFrame`
|
|
77
92
|
|
|
78
93
|
Adds all (or some) of the above methods. Really messes it up.
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Complexifier
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
Make your pandas even worse!
|
|
5
|
+
|
|
6
|
+
Complexifier is a Python library crafted to transform clean datasets into messy versions by introducing random errors and anomalies. This is particularly useful for educational purposes, where students learn to clean data through practical experience.
|
|
7
|
+
|
|
8
|
+
Problem
|
|
9
|
+
-------
|
|
10
|
+
|
|
11
|
+
When teaching students to work with data, an important lesson is how to clean it.
|
|
12
|
+
|
|
13
|
+
The problem with this is that there are two types of datasets available on the internet:
|
|
14
|
+
|
|
15
|
+
1. Data that is good, but already cleaned
|
|
16
|
+
2. Data that is not cleaned, but is terrible and incomprehensible
|
|
17
|
+
|
|
18
|
+
Complexifier solves this problem by allowing you to take the former and turn it into a better version of the latter!
|
|
19
|
+
|
|
20
|
+
Dependencies
|
|
21
|
+
------------
|
|
22
|
+
|
|
23
|
+
Complexifier relies on the following packages:
|
|
24
|
+
|
|
25
|
+
- `pandas`
|
|
26
|
+
- `typo`
|
|
27
|
+
- `random`
|
|
28
|
+
|
|
29
|
+
Ensure these dependencies are installed in your environment.
|
|
30
|
+
|
|
31
|
+
Installation
|
|
32
|
+
------------
|
|
33
|
+
|
|
34
|
+
You can install `complexifier` via `pip`:
|
|
35
|
+
|
|
36
|
+
.. code-block:: sh
|
|
37
|
+
|
|
38
|
+
pip install complexifier
|
|
39
|
+
|
|
40
|
+
Usage
|
|
41
|
+
-----
|
|
42
|
+
|
|
43
|
+
Once installed, use `complexifier` to add mistakes and simulate anomalies in your data. This library provides several methods:
|
|
44
|
+
|
|
45
|
+
Methods
|
|
46
|
+
-------
|
|
47
|
+
|
|
48
|
+
create_spag_error
|
|
49
|
+
~~~~~~~~~~~~~~~~~
|
|
50
|
+
|
|
51
|
+
.. autofunction:: complexifier.create_spag_error
|
|
52
|
+
|
|
53
|
+
introduce_spag_error
|
|
54
|
+
~~~~~~~~~~~~~~~~~~~~
|
|
55
|
+
|
|
56
|
+
.. autofunction:: complexifier.introduce_spag_error
|
|
57
|
+
|
|
58
|
+
add_or_subtract_outliers
|
|
59
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
60
|
+
|
|
61
|
+
.. autofunction:: complexifier.add_or_subtract_outliers
|
|
62
|
+
|
|
63
|
+
add_standard_deviations
|
|
64
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
65
|
+
|
|
66
|
+
.. autofunction:: complexifier.add_standard_deviations
|
|
67
|
+
|
|
68
|
+
duplicate_rows
|
|
69
|
+
~~~~~~~~~~~~~~
|
|
70
|
+
|
|
71
|
+
.. autofunction:: complexifier.duplicate_rows
|
|
72
|
+
|
|
73
|
+
add_nulls
|
|
74
|
+
~~~~~~~~~
|
|
75
|
+
|
|
76
|
+
.. autofunction:: complexifier.add_nulls
|
|
77
|
+
|
|
78
|
+
swap_dates
|
|
79
|
+
~~~~~~~~~~
|
|
80
|
+
|
|
81
|
+
.. autofunction:: complexifier.swap_dates
|
|
82
|
+
|
|
83
|
+
add_sequential_anomaly
|
|
84
|
+
~~~~~~~~~~~~~~~~~~~~~~
|
|
85
|
+
|
|
86
|
+
.. autofunction:: complexifier.add_sequential_anomaly
|
|
87
|
+
|
|
88
|
+
mess_it_up
|
|
89
|
+
~~~~~~~~~~
|
|
90
|
+
|
|
91
|
+
.. autofunction:: complexifier.mess_it_up
|
|
92
|
+
|
|
93
|
+
Contributing
|
|
94
|
+
------------
|
|
95
|
+
|
|
96
|
+
Feel free to contribute by submitting a pull request on GitHub. For large changes, please open an issue to discuss before implementing changes.
|
|
97
|
+
|
|
98
|
+
License
|
|
99
|
+
-------
|
|
100
|
+
|
|
101
|
+
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
102
|
+
|
|
103
|
+
Contact Information
|
|
104
|
+
-------------------
|
|
105
|
+
|
|
106
|
+
For support or inquiries, please contact Ruy at ruyzambrano@gmail.com
|
|
107
|
+
|
|
108
|
+
Changelog
|
|
109
|
+
---------
|
|
110
|
+
|
|
111
|
+
Version 0.3.3
|
|
112
|
+
|
|
113
|
+
Badges
|
|
114
|
+
------
|
|
115
|
+
|
|
116
|
+
.. image:: https://github.com/ruyzambrano/complexifier/workflows/Test/badge.svg
|
|
117
|
+
:target: https://github.com/ruyzambrano/complexifier/actions
|
|
118
|
+
|
|
File without changes
|
|
@@ -6,23 +6,28 @@
|
|
|
6
6
|
# -- Project information -----------------------------------------------------
|
|
7
7
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
8
8
|
|
|
9
|
-
project =
|
|
10
|
-
copyright =
|
|
11
|
-
author =
|
|
12
|
-
release =
|
|
9
|
+
project = "Complexifier"
|
|
10
|
+
copyright = "2024, Ruy Zambrano"
|
|
11
|
+
author = "Ruy Zambrano"
|
|
12
|
+
release = "0.3.1"
|
|
13
13
|
|
|
14
14
|
# -- General configuration ---------------------------------------------------
|
|
15
15
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
16
16
|
|
|
17
|
-
extensions = []
|
|
17
|
+
extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon", "sphinx.ext.githubpages"]
|
|
18
18
|
|
|
19
|
-
templates_path = [
|
|
19
|
+
templates_path = ["_templates"]
|
|
20
|
+
html_static_path = ["_static"]
|
|
20
21
|
exclude_patterns = []
|
|
21
22
|
|
|
23
|
+
import os
|
|
24
|
+
import sys
|
|
22
25
|
|
|
26
|
+
sys.path.insert(0, os.path.abspath("../../src"))
|
|
23
27
|
|
|
24
28
|
# -- Options for HTML output -------------------------------------------------
|
|
25
29
|
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
26
30
|
|
|
27
|
-
|
|
28
|
-
|
|
31
|
+
|
|
32
|
+
html_theme = "sphinx_rtd_theme"
|
|
33
|
+
html_logo = "assets/complexifier.jpeg"
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
Complexifier
|
|
2
|
+
=============
|
|
3
|
+
|
|
4
|
+
Make your pandas even worse!
|
|
5
|
+
|
|
6
|
+
Complexifier is a Python library crafted to transform clean datasets into messy versions by introducing random errors and anomalies. This is particularly useful for educational purposes, where students learn to clean data through practical experience.
|
|
7
|
+
|
|
8
|
+
Problem
|
|
9
|
+
-------
|
|
10
|
+
|
|
11
|
+
When teaching students to work with data, an important lesson is how to clean it.
|
|
12
|
+
|
|
13
|
+
The problem with this is that there are two types of datasets available on the internet:
|
|
14
|
+
|
|
15
|
+
1. Data that is good, but already cleaned
|
|
16
|
+
2. Data that is not cleaned, but is terrible and incomprehensible
|
|
17
|
+
|
|
18
|
+
Complexifier solves this problem by allowing you to take the former and turn it into a better version of the latter!
|
|
19
|
+
|
|
20
|
+
Dependencies
|
|
21
|
+
------------
|
|
22
|
+
|
|
23
|
+
Complexifier relies on the following packages:
|
|
24
|
+
|
|
25
|
+
- `pandas`
|
|
26
|
+
- `typo`
|
|
27
|
+
- `random`
|
|
28
|
+
|
|
29
|
+
Ensure these dependencies are installed in your environment.
|
|
30
|
+
|
|
31
|
+
Installation
|
|
32
|
+
------------
|
|
33
|
+
|
|
34
|
+
You can install `complexifier` via `pip`:
|
|
35
|
+
|
|
36
|
+
.. code-block:: sh
|
|
37
|
+
|
|
38
|
+
pip install complexifier
|
|
39
|
+
|
|
40
|
+
Usage
|
|
41
|
+
-----
|
|
42
|
+
|
|
43
|
+
Once installed, use `complexifier` to add mistakes and simulate anomalies in your data. This library provides several methods:
|
|
44
|
+
|
|
45
|
+
Methods
|
|
46
|
+
-------
|
|
47
|
+
|
|
48
|
+
create_spag_error
|
|
49
|
+
~~~~~~~~~~~~~~~~~
|
|
50
|
+
|
|
51
|
+
.. autofunction:: complexifier.create_spag_error
|
|
52
|
+
|
|
53
|
+
introduce_spag_error
|
|
54
|
+
~~~~~~~~~~~~~~~~~~~~
|
|
55
|
+
|
|
56
|
+
.. autofunction:: complexifier.introduce_spag_error
|
|
57
|
+
|
|
58
|
+
add_or_subtract_outliers
|
|
59
|
+
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
60
|
+
|
|
61
|
+
.. autofunction:: complexifier.add_or_subtract_outliers
|
|
62
|
+
|
|
63
|
+
add_standard_deviations
|
|
64
|
+
~~~~~~~~~~~~~~~~~~~~~~~
|
|
65
|
+
|
|
66
|
+
.. autofunction:: complexifier.add_standard_deviations
|
|
67
|
+
|
|
68
|
+
duplicate_rows
|
|
69
|
+
~~~~~~~~~~~~~~
|
|
70
|
+
|
|
71
|
+
.. autofunction:: complexifier.duplicate_rows
|
|
72
|
+
|
|
73
|
+
add_nulls
|
|
74
|
+
~~~~~~~~~
|
|
75
|
+
|
|
76
|
+
.. autofunction:: complexifier.add_nulls
|
|
77
|
+
|
|
78
|
+
swap_dates
|
|
79
|
+
~~~~~~~~~~
|
|
80
|
+
|
|
81
|
+
.. autofunction:: complexifier.swap_dates
|
|
82
|
+
|
|
83
|
+
add_sequential_anomaly
|
|
84
|
+
~~~~~~~~~~~~~~~~~~~~~~
|
|
85
|
+
|
|
86
|
+
.. autofunction:: complexifier.add_sequential_anomaly
|
|
87
|
+
|
|
88
|
+
mess_it_up
|
|
89
|
+
~~~~~~~~~~
|
|
90
|
+
|
|
91
|
+
.. autofunction:: complexifier.mess_it_up
|
|
92
|
+
|
|
93
|
+
Contributing
|
|
94
|
+
------------
|
|
95
|
+
|
|
96
|
+
Feel free to contribute by submitting a pull request on GitHub. For large changes, please open an issue to discuss before implementing changes.
|
|
97
|
+
|
|
98
|
+
License
|
|
99
|
+
-------
|
|
100
|
+
|
|
101
|
+
This project is licensed under the MIT License. See the LICENSE file for details.
|
|
102
|
+
|
|
103
|
+
Contact Information
|
|
104
|
+
-------------------
|
|
105
|
+
|
|
106
|
+
For support or inquiries, please contact Ruy at ruyzambrano@gmail.com
|
|
107
|
+
|
|
108
|
+
Changelog
|
|
109
|
+
---------
|
|
110
|
+
|
|
111
|
+
Version 0.3.3
|
|
112
|
+
|
|
113
|
+
Badges
|
|
114
|
+
------
|
|
115
|
+
|
|
116
|
+
.. image:: https://github.com/ruyzambrano/complexifier/workflows/Test/badge.svg
|
|
117
|
+
:target: https://github.com/ruyzambrano/complexifier/actions
|
|
118
|
+
|