malika elkadali
2021-09-05 20:59:15 UTC
Hi all,
i want to execute this spss code in python but ; i dont' know how can i call the code bethween DEFINE and !ENDDEFINE into python code (HOTDECK y=SALAIRE / deck=AGE :
DEFINE HOTDECK (y = !charend ('/')/deck = !charend ("/")).
Output New name = hotdeckextra.
!do !s !in (!y).
.
.
rename variables (newvar = !newname).
!doend.
output close name = hotdeckextra.
!ENDDEFINE.
GET FILE = 'D:\app\test.sav'.
HOTDECK y=SALAIRE / deck=AGE.
i want to execute this spss code in python but ; i dont' know how can i call the code bethween DEFINE and !ENDDEFINE into python code (HOTDECK y=SALAIRE / deck=AGE :
DEFINE HOTDECK (y = !charend ('/')/deck = !charend ("/")).
Output New name = hotdeckextra.
!do !s !in (!y).
.
.
rename variables (newvar = !newname).
!doend.
output close name = hotdeckextra.
!ENDDEFINE.
GET FILE = 'D:\app\test.sav'.
HOTDECK y=SALAIRE / deck=AGE.