|
Thanks to those of you who have offered help in looping and macros and python. I still have a couple of questions. 1. Most importantly, how do I loop through sets of parameters instead of all possibilities? For example:
spss.Submit(r"""
/SQL="SELECT ....FROM....WHERE... "
When I run something like this, I get 9 files, ax, ay, az, bx, by, etc...
2. Does anyone know if there are different rules for string, numeric, and date variables for looping? Thanks, and be well!
"If people don't want to come out to the ballpark, how are you going to stop them?"
|
|
Instead of nesting the loops, pass them in parallel: for p1, p2 in zip(parameter1, parameter2): ... That will pick off the values in parallel for the two tuples. HTH, Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435
Thanks to those of you who have offered help in looping and macros and python. I still have a couple of questions. 1. Most importantly, how do I loop through sets of parameters instead of all possibilities? For example:
spss.Submit(r"""
/SQL="SELECT ....FROM....WHERE... "
When I run something like this,
I get 9 files, ax, ay, az, bx, by, etc... 2. Does anyone know if there are different rules for string, numeric, and date variables for looping? Thanks, and be well!
"If people don't want to come out
to the ballpark, how are you going to stop them?"
The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, transmission, re-transmission, dissemination or other use of, or taking of any action in reliance upon this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.
|
|
|
It's true that izip stops as soon as any iterable is exhausted. If you want the opposite behavior and are on Python 2.6, you can do this. from itertools import izip_longest for a,b in izip_longest(seq1, seq2) ... The default value for the shorter series is None. Jon Peck SPSS, an IBM Company [hidden email] 312-651-3435 (from Australia)
|
|
In reply to this post by Jon K Peck
Good Afternoon
List, I want to use
the third patch for ver. 17 but need to know whether I will have to update all
my Python plug-ins as well. Will
someone who has already travelled this path let us know whether this is a
requirement for continued happiness with Python as is, or do we need to
traverse the path of patch and angst J TIA Mike |
| Free forum by Nabble | Edit this page |
