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

Unexpected column title causes problems in filters #107

Open
rpgoldman opened this issue Jan 2, 2019 · 6 comments
Open

Unexpected column title causes problems in filters #107

rpgoldman opened this issue Jan 2, 2019 · 6 comments

Comments

@rpgoldman
Copy link
Contributor

I have a pandas data table that is full of flow cytometry data -- this is data from a piece of cell biology measurement equipment. It has columns with different optical channels for each unit. The optical channels' names are all of this pattern 'XXX-Y', for example 'BL1-A'.
This causes problems with the query processing, because of two things:

  1. the query interpreter misinterprets BL1-A as BL1 minus A
  2. there is no feedback to the user to indicate a problem. I see the following in the shell (I started running DataExplore as python3 -m pandastable/main.py):
pandas.core.computation.ops.UndefinedVariableError: name 'BL1' is not defined

but if you are not looking at a terminal window, you won't see this.

I can enter this using the widgets, so I guess that's the work-around. But it would be nice to see the errors in interpreting the string. If I can figure it out, I'll try to make a PR for this.

@dmnfarrell
Copy link
Owner

Yes I just ignore the errors and throw them away which obviously is not that helpful. It would just mean printing the errors in the terminal. I don't think columns with such symbols can be interpreted. You could convert your column names using the tool in dataexplore to replace the -.

@rpgoldman
Copy link
Contributor Author

Would it be possible to throw the errors into a pop-up menu? I've never used tkinter, but I have used Tcl+Tk, so if you could point me at code that pops up a modal dialog box, I will submit a merge request that makes these errors visible to the programmer.

@dmnfarrell
Copy link
Owner

Well for non programmers it could be annoying if a popup appears with every error. I was thinking it might be better to send the stack traces to a log using the logging module: https://realpython.com/python-logging/
Do you have an experience with that?

@rpgoldman
Copy link
Contributor Author

No, I'm afraid I have never tried.
Note, though, that the string command, which is where this error arises, is not likely to be used by any but programmers, so a pop up might not be so bad.
A logger makes sense, though. I just haven't used one.
By the way, I have a tweaked version where I inserted an optional debugger from StackExchange that lets me throw into the debugger when I want to. I'll see about sharing that, if you are interested.

@dmnfarrell
Copy link
Owner

Sure you can show me how you do that. It could be best to create a debug mode that you activate and then it creates the popups but it might be a bit too ad hoc. I would prefer something simple to implement. I will look into the logging. It's something I would have done long ago if I had time.

@rpgoldman
Copy link
Contributor Author

See #110. Note that this is not ready for merge -- it's just a starting point. But it might be helpful for you, as well as me.

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