Jon You recently supplied Python code to solve a problem in which all variable and value labels were lower case. See thread: “First letters of labels all in lower case”. Your Python code changed all first letters of all labels to upper case, leaving only a few manual changes needed for embedded sets of initials, names of countries etc. I have now encountered the opposite problem. In the SPSS *.sav files distributed by the Roper Center for the NORC General Social Survey 2008 (used as an exemplar in Sweet and Grace-Martin), all variable variable and value labels are in UPPER CASE. This makes for quite ugly printed output. The file, probably for historical reasons, not only has upper case labels for everything, but also seems to restrict var names to 8, var labs to 40 and val labs to 16-20 characters. disp lab /var marital to race .
[NB Names + labels,values + labels both used when I explore files for the first time]
I can copy/paste the Label column from Variable View in and out of Word to change the variable labels to lower case, but it will take for ever to change the value labels. After that I can just run your previous Python code to restore first letters to upper case and then tidy up manually for initials etc. Labels IAP, DK and NA are consistent throughout for values specified as MISSING, but the actual values may not all be the same. As with the British Social Attitudes series, the same procedure is applicable to the entire GSS series. If I send you [off-list] an extract from the file, would you have time to knock out another bit of Python code to convert all upper case to lower case, except for freestanding IAP, DK and NA? I can probably do the rest myself? Thanks in advance John John F Hall (Mr) [Retired academic survey researcher] Email: [hidden email] Website: www.surveyresearch.weebly.com SPSS start page: www.surveyresearch.weebly.com/spss-without-tears.html |
Free forum by Nabble | Edit this page |