-
Notifications
You must be signed in to change notification settings - Fork 414
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
Predefined Filters - ability to group them and also to toggle on/off #555
Comments
@aschonfeld What I had in mind for #5 was something more akin to compound parameters for a query. E.g. let's say your data is related to animals and you initially have filters A and B, where A is |
@proxseas just wanted to give you an update on this. I've got the first 3 working right now locally |
Awesome, thanks for the update. |
@proxseas as for the default sort (7) you could just add it to whatever piece of code loads your data. Otherwise, I can certainly add the ability to specify a sort when calling Now sure how valuable that is, but it could certainly be done. Now as for your grouping filters (5) I'm not sure what the difference between wht you're asking for and what already exists for the
Ignore the Then here's what it looks like in the app: Let me know if theres something else missing |
I'm not sure how valuable "coloring or rows" (6) will be since filters are concatenated together using If we allowed for |
@aschonfeld That video is looking good. Do you think it would be possible persist some of the filter settings to a text/json file? For example, toggling enabled/disabled for a predefined filter. More importantly, I think it would be super neat if it was possible to edit/define some of the filters in an external text file (probably located in the current working directory) and then hit a button in the current dtale instance and then have the changes loaded. Initially, it makes more sense to set up a filter within a Jupyter Notebook (that's how I use pandas, generally), but once you have more of them, it might be nice to have that separation of concerns.
You're right - there is little point in adding this to dtale when it's so simple to do in pandas. That was a silly request. |
Haha, unfortunately I just finished adding the ability to specify a default sort (as described in my comment from last night). At least it will be done regardless of whether anyone uses it. So the only reason why a static file will not work for predefined filters is because of the So the idea is that you'd set some environment variable like Maybe this could be part of the next release... |
No worries - it definitely won't hurt. I think sorting is directly related to the presentation of data, rather than its transformation, so it will fit in nicely with dtale's functionality.
Sounds a bit involving. Maybe I'll set aside time later on to try this approach :) |
Also, I was wondering if you could advise on something relating to categories. In one of my Jupyter Notebooks, I have a column called "tags" and there I have a Python list that is converted to a string. E.g. one row's "tags" column could have the value "['burger','fast food','American']" (note that the whole thing is a string - it's no longer a list). Then, I would query for rows containing specific tags using queries such as |
Wow, yea I've definitely come across some instances of people using complex objects as values for cells in a pandas dataframe (for example lists). I'm not sure how well D-Tale would handle this, but I think it will at least render it in a readible fashion (I hope) But anyways, here's a nice article detailing someone's struggles with list data in pandas dataframes. Personally I like their "Method 2" approach which will eventually convert all the list data into a bunch of boolean columns describing whether a row contains that value or not. That translates pretty well to D-Tale, I think. But even if it doesn't that is how we would have handled it back in data science days. |
added in v1.56.0 |
I've been enjoying using Custom Filters and Predefined filters quite a bit, but what I find myself doing quite a bit is simply copying and pasting saved queries in the Custom Filters dialog. This is not optimal, but it is the most powerful way for me to use this plugin for now. However, I think it could be enhanced easily with some of the following changes (in an approximate order of how easy it would be implement them):
Essentially, functionality 3-5 is what I achieve by copying & pasting saved queries.
The text was updated successfully, but these errors were encountered: