Zero padded string of digits read as numeric dara

Issue #66 new
Former user created an issue

I have some sav files with geographic codes which are strings of digits and often zero padded. They end up getting read by savReader as numeric, which is causing some problems. Is there a way to force all data in the sav file to be read as a string?

Comments (1)

  1. Albert-Jan Roskam repo owner

    What display format was used in SPSS? You can use SPSS, or SavHeaderReader to figure this out. Basically, all numerical values become floats, with two exceptions: datetimes (become iso8601 strings), N-format = numerical values displayed as zero-padded in SPSS (become zero-padded strings in Python). If the N-format was used, and yet you end up getting floats, this may be a bug.

  2. Log in to comment