Login  Register

Re: Deleting specific value labels

Posted by Jon K Peck on Jun 18, 2015; 12:36pm
URL: http://spssx-discussion.165.s1.nabble.com/Deleting-specific-value-labels-tp5729847p5729861.html

Try
        if vl == "<none>":


Jon Peck (no "h") aka Kim
Senior Software Engineer, IBM
[hidden email]
phone: 720-342-5621




From:        emma78 <[hidden email]>
To:        [hidden email]
Date:        06/18/2015 06:26 AM
Subject:        Re: [SPSSX-L] Deleting specific value labels
Sent by:        "SPSSX(r) Discussion" <[hidden email]>




Nobody has a value for those value label, We have special crossheadings  in
our online suvey which unfortunately generates codes but nobody can click on
those ;)


John , one last question:
What would it look like, if I wnat to search for a empty label? I tried
none, blank but that doesn't seem to work.  Thank you!

begin program.
import spss, spssaux

vardict = spssaux.VariableDict()
for v in vardict:
   vallbls = v.ValueLabels
   for k, vl in vallbls.items():
       if vl == "no answer":
           del(vallbls[k])
           v.ValueLabels = vallbls
           break
end program.




--
View this message in context:
http://spssx-discussion.1045642.n5.nabble.com/Deleting-specific-value-labels-tp5729847p5729860.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD


===================== To manage your subscription to SPSSX-L, send a message to [hidden email] (not to SPSSX-L), with no body text except the command. To leave the list, send the command SIGNOFF SPSSX-L For a list of commands to manage subscriptions, send the command INFO REFCARD