
Mark Derbecker
Seeq Team-
Posts
42 -
Joined
-
Last visited
-
Days Won
9
Mark Derbecker last won the day on May 21
Mark Derbecker had the most liked content!
Personal Information
-
Company
Seeq Corporation
-
Title
VP of Engineering
-
Level of Seeq User
Seeq Super-User
Recent Profile Visitors
The recent visitors block is disabled and is not being shown to other users.
Mark Derbecker's Achievements
-
OK great-- it'll end up being someone else to answer that question because I'm not sure myself.
-
In the code I gave you, you'll see I use the `FormulaParameters` variable like so: 'Formula Parameters': FormulaParameters The only thing wrong with the code I gave you (so far) is that you're not handling the case where spy.search() is returning zero rows. You'll need to debug that and put in error handling code. > Has anyone ever done this successfully? Yes. However, I'd say that you have to understand some Python basics: What is a dictionary and how does it work, what is its syntax; what is a set and what is its syntax. I supplied some references above for learning.
-
This error is coming from Pandas and indicates that your search result returned zero rows. You'll need to check to see that your spy.search() result includes at least one row. I think it's important that you step through your code and really try to understand what each line is doing, it'll be too hard for us to have a back and forth for every error you encounter. There are a bunch of online resources for understanding Python and Pandas basics: https://www.google.com/search?q=best+resource+for+learning+python+and+pandas
-
PM_SIM_SetModels_230416 - MarkD Edits.ipynb Pat, here's an updated version. I'm not able to test it because I don't have your data sets. But the primary difference is that I replaced this line that dynamically assigns values to local variables: # locals()[InputVar + '_ID'] = spy.search({ with code that just stores the IDs in a dictionary: SearchResults = spy.search({ 'Name': InputVar + '_ID', 'Scoped To':scopedtoid }) InputVar_ID = SearchResults.iloc[0]['ID'] TagIDs[InputVar] = InputVar_ID You can see that instead of constructing a string, we construct a `FormulaParameters` dictionary where the keys are variable names and the values are IDs. If it doesn't work right away, it won't surprise me because I couldn't test it. Please take a little time debugging it by adding print statements and walking through it so you have a feel for what it's doing..
-
Any chance you could just upload your entire .ipynb file? That way I can propose a rewrite that doesn't involve constructing a string.
-
You'll want to click Show Stack Trace. I believe that error is likely coming from Pandas, indicating that one of your DataFrames is empty. The reason I say this is an unorthodox method is that it's very hard to debug. It would be better to deal with the variables names in string form rather than assigning them to Python variables and then constructing code via string concatenation. I.e., instead of creating a variable called PulpEye_BlendFreeness_ID, just keep a DataFrame with row a row whose Name is PulpEye_BlendFreeness and has an ID column. ChatGPT may be able to help you understand your code and suggest a better method overall. You can paste it in and ask it to help you structure it in a more supportable way.
-
Hmmm, you're constructing Python code within a string... so I think you could add FormVarListDict = eval('{' + FormVarList + '}') and then use it as 'Formula Parameters': FormVarListDict It's unorthodox but I think it would work.
-
Can you post a good chunk of your code as text so it's easier to see what you're doing in the lines above your screenshot?
-
Mark Derbecker started following Setting Max Interpolation for a signal through DataLab , Creating a Formula Parameters string? , Pandas 2.0 compatibility and 2 others
-
Formula Parameters needs to be a Python dictionary, where the keys are the variable names and the values are the IDs, or a Pandas DataFrame row containing the ID. So instead of constructing a string on line 60, you'll need to create a dictionary and assign rows from a spy.search() call. You can see how to do it near the end of the SPy Tutorial: https://python-docs.seeq.com/user_guide/Tutorial.html#pushing-a-new-condition-to-seeq
-
@Michael Jancsy, SPy v187.0 has been published and is Pandas 2.x compatible
-
I'm looking into Pandas 2.0 compatibility right now... we hope to have a Pandas 2.0-compatible version of SPy published shortly.
-
I'm not sure what's happening, but I'd recommend uninstalling all "private" versions of the seeq module. "Private" versions are those that are found in /home/datalab/.local. That way you will be using the version of seeq module that is supplied with Data Lab.
-
Hi Mohamed, do you have a question about what the error message is trying to tell you? Have you tried the command it recommends that you execute at the end of the message?
-
spy.pull() Error - Is it possible to ignore the error?
Mark Derbecker replied to Wen's topic in Seeq Data Lab
Hi Wen, You should be able to supply the "errors" argument to skip over the error: spy.pull(items, errors='catalog') -
Setting Max Interpolation for a signal through DataLab
Mark Derbecker replied to Wen's topic in Seeq Data Lab
Hi Wen-- Maximum Interpolation is special, it has to be "overridden". Just change property_name to 'Override Maximum Interpolation'.- 1 reply
-
- 1
-