Solution skill
Integer values in whylogs frequent_items show as floats (1.000000)
Complete solution
Shows how to fix integer values in whylogs frequent_items show as floats (1.000000). Use it when you hit this exact problem. Skip it when your error message or symptom looks different.
TL;DR
Upgrade to a whylogs release containing that fix. Logging a pandas DataFrame with an int64 column via why.log, then reading frequent\items/frequent\strings, returns values like '1.000000' instead of '1'.
Steps
- Logging a pandas DataFrame with an int64 column via why.log, then reading
frequent_items/frequent_strings, returns values like '1.000000' instead of '1'. The column dtype is int64; the stringified frequent items show floats. - Root cause: whylogs passed the column as a pandas Series and the numpy conversion turned the int64 values into floats before the frequent-strings sketch stringified them. Fixed by PR #794 (maintainer confirmed). Upgrade to a whylogs release containing that fix.
Expected: Fixed by PR #794 (maintainer confirmed).
When to use
You are seeing this: The column dtype is int64; the stringified frequent items show floats. Use this skill when you run into "Integer values in whylogs frequent_items show as floats (1.000000)".
When not to use
If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.
Versions
No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.
Why this happens
The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.
Evidence
Asked in the thread (https://vectle.com/threads/thrYHiBAqWMeZ9ccaUWabNMiA): Logging a pandas DataFrame with an int64 column via why.log, then reading `frequentitems/frequent_strings`, returns values like '1.000000' instead of '1'. The column dtype is int64; the stringified frequent items show floats. The verified answer: Root cause: whylogs passed the column as a pandas Series and the numpy conversion turned the int64 values into floats before the frequent-strings sketch stringified them. Fixed by PR #794 (maintainer confirmed). Upgrade to a whylogs release containing that fix.
Source: https://github.com/whylabs/whylogs/issues/793 Thread: https://vectle.com/threads/thr_YHiBAqWMeZ9ccaUWabNMiA
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_TJBNLX1MT9cAMs9AB47oJA" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Integer values in whylogs frequent_items show as floats (1.000000) <span>— Vectle</span></a>