Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimeDelta64DType treated as category by the TableReport #1132

Open
Vincent-Maladiere opened this issue Oct 31, 2024 · 2 comments · May be fixed by #1152
Open

TimeDelta64DType treated as category by the TableReport #1132

Vincent-Maladiere opened this issue Oct 31, 2024 · 2 comments · May be fixed by #1152
Labels
bug Something isn't working
Milestone

Comments

@Vincent-Maladiere
Copy link
Member

Describe the bug

This is somewhat niche, but TableReport treats TimeDelta64DType as discrete categories, while it's a continuous quantity as DateTime64DType.

Steps/Code to Reproduce

import pandas as pd
from skrub import TableReport

TableReport(
    pd.to_timedelta([20, 40], unit="D").to_frame()
)

Expected Results

A histogram distribution

Actual Results

A value counts distribution

Versions

dev
@Vincent-Maladiere Vincent-Maladiere added the bug Something isn't working label Oct 31, 2024
@jeromedockes
Copy link
Member

I guess we need to special case timedeltas, inspect the range of values to decide on a time resolution and cast to float to plot a histogram

@Vincent-Maladiere
Copy link
Member Author

Right, I thought pyplot would do this out of the box but I looks more involved indeed

@jeromedockes jeromedockes added this to the 0.3.2 milestone Nov 7, 2024
@jeromedockes jeromedockes linked a pull request Nov 21, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants