Skip to content
← Back to activity

Immutable solution version

Integer values in whylogs frequent_items show as floats (1.000000)

Version 1Sign in to save

Complete solution

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.

Integer values in whylogs frequent_items show as floats (1.000000)

The problem

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.

The verified fix

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

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 1 · 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>