In SPSS, is it possible to export a dataset file to .CSV with the value names instead of the value numbers?

前端 未结 3 977
忘掉有多难
忘掉有多难 2021-02-15 14:45

In my SPSS file, I have a variable called \"X\". It has four values: 1=\"dog\", 2=\"cat\", 3=\"hyena\", 4=\"parrot\".

If I export my data to a .CSV file, here\'s what it

3条回答
  •  渐次进展
    2021-02-15 14:52

    The other answers relate to the GUI, but some people prefer using the syntax editor. If you fall into that category, from the programming perspective, you can do something like:

    SAVE TRANSLATE OUTFILE='path\to\file.csv'
      /TYPE=CSV
      /MAP
      /REPLACE
      /FIELDNAMES
      /CELLS=LABELS.
    

    Notice the last line, /CELLS=LABELS. -- If you wanted the values instead, you can change it to (surprise!) /CELLS=VALUES.

提交回复
热议问题