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

Filtering not working for boolean data. #45

Closed
kaiayoung opened this issue Sep 5, 2019 · 1 comment
Closed

Filtering not working for boolean data. #45

kaiayoung opened this issue Sep 5, 2019 · 1 comment

Comments

@kaiayoung
Copy link
Contributor

This is probably a quick fix, but we may also want to create some custom filtering options in the operator menu for boolean data. Sample code:

import pandas as pd
import numpy as np
import json
import random
from ipydatagrid import DataGrid, TextRenderer, Expr
n = 5
df = pd.DataFrame({
    'Value 1': [random.choice([True, False]) for i in range(n)],
    'Value 2': [random.choice([True, False]) for i in range(n)],
    'Value 3': [random.choice([True, False]) for i in range(n)],
    'Value 4': [random.choice([True, False]) for i in range(n)],
})

jsontable = json.loads(df.to_json(orient='table'))
DataGrid(data=jsontable)
@martinRenou
Copy link
Member

Fixed by #46

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