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 with $ not working for Tables with column names with multiple spaces #7534

Closed
tcombes1 opened this issue Jun 15, 2018 · 4 comments
Closed

Comments

@tcombes1
Copy link

Hello beakerX folks, you made my life so much easier, so thank you for the great work (especially with these tables!).

Found an issue (I think) that is able to be reproduced inside of the TableAPI.ipynb example notebook environment from inside Binder. (if more info is needed, please reach out).

I created this simple table from a defined pandas dataframe to demonstrate and ran it in a new cell in the notebook:

table=TableDisplay(pd.DataFrame(data=[[4.0,'Hello',1.0],
                                      [2.9,'World',3.2]],
                                columns=['col 1try','col2','col3']))
table

It looks like this after I turn on the "Filter by Expression"
filteredpresuccess

I then attempt to filter the column 'col 1try' like this (even without using 3.0):
filteredsuccess

Which works as I would think. Wonderful.

Now when I change the name of the column from 'col 1try' to 'col 1 try' (whitespace between 1 and try) like this:

table=TableDisplay(pd.DataFrame(data=[[4.0,'Hello',1.0],
                                      [2.9,'World',3.2]],
                                columns=['col 1 try','col2','col3']))
table

I get this after I turn on the "Filter by Expression":
filteredprefailure

I then attempt to filter the column 'col 1 try' like this:
filteredfailure

And get no filtering action. I've tried 3.0 and nothing still. From what I can tell it appears to be column names with non-consecutive whitespaces. I tried it with success for multiple whitespaces and it behaved as in the first scenario.

I'm am unsure whether this is actually a bug or just a nuance of the table text parsing engine, or whether I should be using different syntax for the logic, so feedback would be appreciated. Thanks everyone!

@scottdraves
Copy link
Contributor

wow thanks for the report!

@scottdraves
Copy link
Contributor

related? #7295

@scottdraves
Copy link
Contributor

#7537

@tcombes1
Copy link
Author

Thank you @scottdraves !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants