# Engarde - Python defensive data analysis

**URL:** <https://discourse.julialang.org/t/engarde-python-defensive-data-analysis/21334>\
**Category:** Data\
**Created:** [March 1, 2019, 7:59am UTC](https://discourse.julialang.org/t/engarde-python-defensive-data-analysis/21334 "2019-03-01T07:59:37Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [March 1, 2019, 7:59am UTC](https://discourse.julialang.org/t/engarde-python-defensive-data-analysis/21334/1 "2019-03-01T07:59:38Z")

</div>

I went to a Meet up o data engineering at [https://www.quantumblack.com/](https://www.quantumblack.com/)  
Engarde was mentioned:  
[Engarde! — engarde 0.4.0+9.ge7ea040 documentation](https://engarde.readthedocs.io/en/latest/)

Looks very useful. Is there anything similar in Julia?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 1, 2019, 8:08am UTC](https://discourse.julialang.org/t/engarde-python-defensive-data-analysis/21334/2 "2019-03-01T08:08:00Z")

</div>

I am puzzled why this was packaged up. It basically amounts to

```julia
@assert MyProject.is_valid_data(data)

```

where the real content is in `is_valid_data`, which one would define anyway on a per-dataset basis.

---

<div class="post-metadata">

**Author:** ![johnh](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/johnh/32/3615_2.png) [@johnh](https://discourse.julialang.org/u/johnh)\
**Post date:** [March 1, 2019, 10:09am UTC](https://discourse.julialang.org/t/engarde-python-defensive-data-analysis/21334/3 "2019-03-01T10:09:28Z")

</div>

The example given was when developing a data science pipeline. Things might change and this acts as a test every time a new pipeline is run. It just looked a useful feature to me.

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [March 1, 2019, 10:42am UTC](https://discourse.julialang.org/t/engarde-python-defensive-data-analysis/21334/4 "2019-03-01T10:42:56Z")

</div>

I am not questioning the usefulness of validating data, just pointing out that

1. the actual validation criteria is usually dependent on the dataset, and thus hard to generalize in the package,
2. but it can be wrapped in a routine for a particular project, and called in a single line.

I don’t see what a package would and what it could look like. Most of the [building blocks](https://engarde.readthedocs.io/en/latest/api.html) are already defined in Julia, eg `issorted`, or can be trivially implemented, eg `!any(isnan, array)`.
