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

Add heat map to float32, float16, int16, and int8 dtypes #21682

Closed
Chuck321123 opened this issue Jan 8, 2024 · 2 comments
Closed

Add heat map to float32, float16, int16, and int8 dtypes #21682

Chuck321123 opened this issue Jan 8, 2024 · 2 comments
Assignees

Comments

@Chuck321123
Copy link

Chuck321123 commented Jan 8, 2024

Didnt realize there were no heat map/ background colors for the dtypes mentioned in the title. See for yourself.

import pandas as pd
import numpy as np

# Set a random seed for reproducibility
np.random.seed(42)

# Create a DataFrame with 50 rows and two columns
data = {
    'Col1': np.random.randint(1, 1000, 50),
    'Col2': np.random.uniform(1, 1000, 50).round(3)         
}

x = pd.DataFrame(data)

x["Col3"] = x["Col2"].astype("float64")
x["Col4"] = x["Col2"].astype("float32")
x["Col5"] = x["Col2"].astype("float16")
x["Col6"] = x["Col1"].astype("int64")
x["Col7"] = x["Col1"].astype("int32")
x["Col8"] = x["Col1"].astype("int16")
x["Col9"] = x["Col1"].astype("int8")
@jitseniesen
Copy link
Member

Hi, @Chuck321123, thanks for the report. This is fixed in the upcoming Spyder 6 release which I think should become available in two months or so. The fix is in PR #21295. It's actually a lucky side-effect of that change, as I did not have the smaller float and int types in mind when writing it. The only potential issue is that the fix requires Pandas version 2. Would that be a problem for you?

@jitseniesen jitseniesen self-assigned this Jan 8, 2024
@Chuck321123
Copy link
Author

@jitseniesen No, thats perfect. Thanks

@jitseniesen jitseniesen closed this as not planned Won't fix, can't repro, duplicate, stale Jan 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants