-
Notifications
You must be signed in to change notification settings - Fork 84
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
Jupyterlab shows tables in black on black #1167
Labels
Comments
The html table style is defined here, hardcoded for light themes. Not ideal, but running an editable install would allow you to adjust these values |
@CBroz1 what would you suggest for a better solution? |
I can see a few possible paths...
Example Pandas adjustment for primary keysimport pandas as pd
from IPython.display import display
data = {
'id': [1, 2, 3],
'name': ['Alice', 'Bob', 'Charlie'],
'age': [24, 27, 22],
'email': ['[email protected]', '[email protected]', '[email protected]']
}
df = pd.DataFrame(data)
primary_key_cols = ['id', 'name']
def style_primary_keys(df, primary_key_cols):
styled_cols = {col: f"*{col}" if col in primary_key_cols else col for col in df.columns}
df = df.rename(columns=styled_cols)
return df
styled_df = style_primary_keys(df, primary_key_cols)
display(styled_df.style) I don't think 1 is worth the additional maintenance burden. 2 may be the most long-term solution, but 3 is an easier short-term solution. I lean toward 2. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In Jupyterlab table previews are suddenly unreadable in dark and dark-high-contrast themes. I am not sure what happened here, but I seem not to be able to revert it to showing the font in white. This might be a jupyter lab issue and not a datajoint issue.
OS: Mac OS
Jupyter lab: Version 4.2.4
Datajoint python: Version 0.14.1
The text was updated successfully, but these errors were encountered: