synthesized-io / insight

🧿 Metrics & Monitoring of Datasets
BSD 3-Clause "New" or "Revised" License
12 stars 0 forks source link

KendallTauCorrelation datetime support #158

Closed nialldevlin1 closed 6 months ago

nialldevlin1 commented 6 months ago

The _compute_metric method in the KendallTauCorrelation class crashes when processing columns with dtype datetime64[ns] with the error

TypeError: reduction operation 'corr' not allowed for this dtype

This PR solves the issue by casting datetime columns to int64 dtype.

sonarcloud[bot] commented 6 months ago

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
100.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

codecov[bot] commented 6 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (2b430fc) 79.6% compared to head (f8bc1e2) 79.9%.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/synthesized-io/insight/pull/158/graphs/tree.svg?width=650&height=150&src=pr&token=S8CD8EN4AF&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io)](https://app.codecov.io/gh/synthesized-io/insight/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io) ```diff @@ Coverage Diff @@ ## master #158 +/- ## ======================================== + Coverage 79.6% 79.9% +0.2% ======================================== Files 11 11 Lines 916 927 +11 Branches 141 145 +4 ======================================== + Hits 730 741 +11 Misses 142 142 Partials 44 44 ``` | [Files](https://app.codecov.io/gh/synthesized-io/insight/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io) | Coverage Δ | | |---|---|---| | [src/insight/metrics/metrics.py](https://app.codecov.io/gh/synthesized-io/insight/pull/158?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=synthesized-io#diff-c3JjL2luc2lnaHQvbWV0cmljcy9tZXRyaWNzLnB5) | `91.5% <100.0%> (+0.4%)` | :arrow_up: |