|
2 | 2 | .. |
3 | 3 | .. SPDX-License-Identifier: BSD-3-Clause |
4 | 4 |
|
5 | | -Data cleansing and validation |
6 | | -============================= |
| 5 | +Cleaning and validating data |
| 6 | +============================ |
7 | 7 |
|
8 | | -In the following, we want to give you a practical overview of various libraries |
9 | | -and methods for `data cleansing <https://en.wikipedia.org/wiki/Data_cleansing>`_ |
10 | | -and validation with Python. Besides well-known libraries like |
11 | | -:doc:`/workspace/numpy/index` and ,:doc:`/workspace/pandas/index` |
12 | | -we also use several small, specialised libraries like :doc:`dedupe |
13 | | -<deduplicate>`, :doc:`fuzzywuzzy <string-matching>`, :doc:`voluptuous |
14 | | -<voluptuous>`, :doc:`tdda <tdda>` and :doc:`hypothesis <hypothesis>`. We prefer |
15 | | -these more lightweight solutions to large, universal systems like `Great |
16 | | -Expectations <https://greatexpectations.io/>`_ or `MobyDQ |
17 | | -<https://ubisoft.github.io/mobydq/>`_. |
| 8 | +*‘Garbage in, garbage out’* is a stark reminder that it is almost impossible to |
| 9 | +draw meaningful insights from poor-quality data. Whilst there are highly |
| 10 | +regulated, safety-critical sectors in which data is routinely checked at every |
| 11 | +stage, the general standard of data validation in most analytical projects tends |
| 12 | +to be rather low. |
18 | 13 |
|
19 | | -.. tip:: |
20 | | - `cusy seminar: Cleanse and validate data with Python |
21 | | - <https://cusy.io/en/our-training-courses/cleanse-and-validate-data-with-python.html>`_ |
| 14 | +However, if we write code to analyse data without first checking it, some |
| 15 | +results will be misleading, incorrect or invalid. The same applies if we fail to |
| 16 | +validate our output. In doing so, we end up contributing to the very *‘bad |
| 17 | +data’* that we all rail against. *Postel’s Law* – the principle of robustness |
| 18 | +proposed in the TCP standard – is helpful here: |
| 19 | + |
| 20 | + *“be conservative in what you do, be liberal in what you accept from |
| 21 | + others.”* [#]_ |
| 22 | + |
| 23 | +This stands in stark contrast to one of Python’s principles: |
22 | 24 |
|
23 | | -Overview |
24 | | --------- |
| 25 | + *“Errors should never pass silently.”* [#]_ |
25 | 26 |
|
26 | | -.. csv-table:: GitHub-Insights |
27 | | - :header: "Name", "Stars", "Mitwirkende", "Commit-Aktivität", "Lizenz" |
| 27 | +The :doc:`XML <../data-processing/serialisation-formats/xml-html/index>` |
| 28 | +specification also requires that malformed XML documents be rejected: |
28 | 29 |
|
29 | | - "`scikit-learn <https://github.com/scikit-learn/scikit-learn>`_",".. image:: https://raster.shields.io/github/stars/scikit-learn/scikit-learn",".. image:: https://raster.shields.io/github/contributors/scikit-learn/scikit-learn",".. image:: https://raster.shields.io/github/commit-activity/y/scikit-learn/scikit-learn",".. image:: https://raster.shields.io/github/license/scikit-learn/scikit-learn" |
30 | | - "`fg-data-profiling <https://github.com/Data-Centric-AI-Community/fg-data-profiling>`_",".. image:: https://raster.shields.io/github/stars/Data-Centric-AI-Community/fg-data-profiling",".. image:: https://raster.shields.io/github/contributors/Data-Centric-AI-Community/fg-data-profiling",".. image:: https://raster.shields.io/github/commit-activity/y/Data-Centric-AI-Community/fg-data-profiling",".. image:: https://raster.shields.io/github/license/Data-Centric-AI-Community/fg-data-profiling" |
31 | | - "`Hypothesis <https://github.com/HypothesisWorks/hypothesis>`_",".. image:: https://raster.shields.io/github/stars/HypothesisWorks/hypothesis",".. image:: https://raster.shields.io/github/contributors/HypothesisWorks/hypothesis",".. image:: https://raster.shields.io/github/commit-activity/y/HypothesisWorks/hypothesis",".. image:: https://raster.shields.io/github/license/HypothesisWorks/hypothesis" |
32 | | - "`marshmallow <https://github.com/marshmallow-code/marshmallow>`_",".. image:: https://raster.shields.io/github/stars/marshmallow-code/marshmallow",".. image:: https://raster.shields.io/github/contributors/marshmallow-code/marshmallow",".. image:: https://raster.shields.io/github/commit-activity/y/marshmallow-code/marshmallow",".. image:: https://raster.shields.io/github/license/marshmallow-code/marshmallow" |
33 | | - "`dedupe <https://github.com/dedupeio/dedupe>`_",".. image:: https://raster.shields.io/github/stars/dedupeio/dedupe",".. image:: https://raster.shields.io/github/contributors/dedupeio/dedupe",".. image:: https://raster.shields.io/github/commit-activity/y/dedupeio/dedupe",".. image:: https://raster.shields.io/github/license/dedupeio/dedupe" |
34 | | - "`pandera <https://github.com/unionai-oss/pandera>`_",".. image:: https://raster.shields.io/github/stars/unionai-oss/pandera",".. image:: https://raster.shields.io/github/contributors/unionai-oss/pandera",".. image:: https://raster.shields.io/github/commit-activity/y/unionai-oss/pandera",".. image:: https://raster.shields.io/github/license/unionai-oss/pandera" |
35 | | - "`thefuzz <https://github.com/seatgeek/thefuzz>`_",".. image:: https://raster.shields.io/github/stars/seatgeek/thefuzz",".. image:: https://raster.shields.io/github/contributors/seatgeek/thefuzz",".. image:: https://raster.shields.io/github/commit-activity/y/seatgeek/thefuzz",".. image:: https://raster.shields.io/github/license/seatgeek/thefuzz" |
36 | | - "`Voluptuous <https://github.com/alecthomas/voluptuous>`_",".. image:: https://raster.shields.io/github/stars/alecthomas/voluptuous",".. image:: https://raster.shields.io/github/contributors/alecthomas/voluptuous",".. image:: https://raster.shields.io/github/commit-activity/y/alecthomas/voluptuous",".. image:: https://raster.shields.io/github/license/alecthomas/voluptuous" |
37 | | - "`datacleaner <https://github.com/rhiever/datacleaner>`_",".. image:: https://raster.shields.io/github/stars/rhiever/datacleaner",".. image:: https://raster.shields.io/github/contributors/rhiever/datacleaner",".. image:: https://raster.shields.io/github/commit-activity/y/rhiever/datacleaner",".. image:: https://raster.shields.io/github/license/rhiever/datacleaner" |
38 | | - "`popmon <https://github.com/ing-bank/popmon>`_",".. image:: https://raster.shields.io/github/stars/ing-bank/popmon",".. image:: https://raster.shields.io/github/contributors/ing-bank/popmon",".. image:: https://raster.shields.io/github/commit-activity/y/ing-bank/popmon",".. image:: https://raster.shields.io/github/license/ing-bank/popmon" |
39 | | - "`TDDA <https://github.com/tdda/tdda>`_",".. image:: https://raster.shields.io/github/stars/tdda/tdda",".. image:: https://raster.shields.io/github/contributors/tdda/tdda",".. image:: https://raster.shields.io/github/commit-activity/y/tdda/tdda",".. image:: https://raster.shields.io/github/license/tdda/tdda" |
40 | | - "`Validr <https://github.com/guyskk/validr>`_",".. image:: https://raster.shields.io/github/stars/guyskk/validr",".. image:: https://raster.shields.io/github/contributors/guyskk/validr",".. image:: https://raster.shields.io/github/commit-activity/y/guyskk/validr",".. image:: https://raster.shields.io/github/license/guyskk/validr" |
41 | | - "`Probatus <https://github.com/ing-bank/probatus>`_",".. image:: https://raster.shields.io/github/stars/ing-bank/probatus",".. image:: https://raster.shields.io/github/contributors/ing-bank/probatus",".. image:: https://raster.shields.io/github/commit-activity/y/ing-bank/probatus",".. image:: https://raster.shields.io/github/license/ing-bank/probatus" |
| 30 | + “„Validating and non-validating processors alike MUST report violations of |
| 31 | + this specification's well-formedness constraints … that they read.”* [#]_ |
42 | 32 |
|
43 | | -Dormant projects |
44 | | ----------------- |
| 33 | +The sections on :doc:`procedures/index`, :doc:`procedures/ranges` and |
| 34 | +:doc:`procedures/regression_tests` do not require any prior knowledge of Python |
| 35 | +and are therefore generally suitable for professionals in the fields of data |
| 36 | +management, business management and quality assurance. |
| 37 | + |
| 38 | +We will then provide you with a practical overview of various :doc:`libraries |
| 39 | +and methods <libs-methods/index>` for `data cleaning |
| 40 | +<https://en.wikipedia.org/wiki/Data_cleansing>`_ and validation using Python. |
| 41 | + |
| 42 | +.. tip:: |
| 43 | + `cusy seminar: Cleanse and validate data with Python |
| 44 | + <https://cusy.io/en/our-training-courses/cleanse-and-validate-data-with-python.html>`_ |
45 | 45 |
|
46 | | -.. csv-table:: GitHub-Insights |
47 | | - :header: "Name", "Stars", "Mitwirkende", "Commit-Aktivität", "Lizenz" |
| 46 | +---- |
48 | 47 |
|
49 | | - "`Bulwark <https://github.com/ZaxR/bulwark>`_",".. image:: https://raster.shields.io/github/stars/ZaxR/bulwark",".. image:: https://raster.shields.io/github/contributors/ZaxR/bulwark",".. image:: https://raster.shields.io/github/commit-activity/y/ZaxR/bulwark",".. image:: https://raster.shields.io/github/license/ZaxR/bulwark" |
50 | | - "`PandasSchema <https://github.com/multimeric/PandasSchema>`_",".. image:: https://raster.shields.io/github/stars/multimeric/PandasSchema",".. image:: https://raster.shields.io/github/contributors/multimeric/PandasSchema",".. image:: https://raster.shields.io/github/commit-activity/y/multimeric/PandasSchema",".. image:: https://raster.shields.io/github/license/multimeric/PandasSchema" |
51 | | - "`pandas-validation <https://github.com/jmenglund/pandas-validation>`_",".. image:: https://raster.shields.io/github/stars/jmenglund/pandas-validation",".. image:: https://raster.shields.io/github/contributors/jmenglund/pandas-validation",".. image:: https://raster.shields.io/github/commit-activity/y/jmenglund/pandas-validation",".. image:: https://raster.shields.io/github/license/jmenglund/pandas-validation" |
52 | | - "`Opulent-Pandas <https://github.com/danielvdende/opulent-pandas>`_",".. image:: https://raster.shields.io/github/stars/danielvdende/opulent-pandas",".. image:: https://raster.shields.io/github/contributors/danielvdende/opulent-pandas",".. image:: https://raster.shields.io/github/commit-activity/y/danielvdende/opulent-pandas",".. image:: https://raster.shields.io/github/license/danielvdende/opulent-pandas" |
53 | | - "`signpost <https://github.com/ilsedippenaar/signpost>`_",".. image:: https://raster.shields.io/github/stars/ilsedippenaar/signpost",".. image:: https://raster.shields.io/github/contributors/ilsedippenaar/signpost",".. image:: https://raster.shields.io/github/commit-activity/y/ilsedippenaar/signpost",".. image:: https://raster.shields.io/github/license/ilsedippenaar/signpost" |
| 48 | +.. [#] Jon Postel: `Transmission Control Protocol |
| 49 | + <https://www.rfc-editor.org/info/rfc761/#section-2.10>`_, 1980 |
| 50 | +.. [#] Tim Peters: :pep:`The Zen of Python <20>`, 1999 |
| 51 | +.. [#] `XML Specification 1.0, Section 5.1 |
| 52 | + <https://www.w3.org/TR/2008/REC-xml-20081126/#proc-types>`_, 1998 |
54 | 53 |
|
55 | 54 | .. toctree:: |
56 | 55 | :hidden: |
57 | 56 | :titlesonly: |
58 | 57 | :maxdepth: 0 |
59 | 58 |
|
60 | | - nulls.ipynb |
61 | | - outliers.ipynb |
62 | | - string-matching.ipynb |
63 | | - deduplicate.ipynb |
64 | | - hypothesis.ipynb |
65 | | - tdda.ipynb |
66 | | - voluptuous.ipynb |
67 | | - scikit-learn-reprocessing.ipynb |
68 | | - dask-pipeline.ipynb |
| 59 | + categories |
| 60 | + procedures/index |
| 61 | + libs-methods/index |
0 commit comments