You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to generate SPSS and Stata files using CSV files + JSON metadata as input as described here. However, in the generated files, every numeric variable has decimals, so 1, 2, 3 become 1.0, 2.0, 3.0.
To test, check in SPSS or with pyreadstat: python -c "import pyreadstat; print(pyreadstat.read_sav('outputdata.sav')[1].original_variable_types)"
My output: {'var_a': 'F8.2', 'var_b': 'F8.2'}
var_a should be F8.0.
I've poked around with git bisect, and it seems this is a regression introduced in 93036b0. When I checked out the repo from one commit earlier (1b64538) and reran with the same input I got
{'var_a': 'F8.0', 'var_b': 'F8.2'}
Very grateful for any assistance with generating files without all those .0 decimals.
The text was updated successfully, but these errors were encountered:
I am trying to generate SPSS and Stata files using CSV files + JSON metadata as input as described here. However, in the generated files, every numeric variable has decimals, so 1, 2, 3 become 1.0, 2.0, 3.0.
Steps to reproduce:
inputdata.csv
:meta.json
:cmd:
readstat inputdata.csv meta.json outputdata.sav
To test, check in SPSS or with pyreadstat:
python -c "import pyreadstat; print(pyreadstat.read_sav('outputdata.sav')[1].original_variable_types)"
My output:
{'var_a': 'F8.2', 'var_b': 'F8.2'}
var_a
should be F8.0.I've poked around with git bisect, and it seems this is a regression introduced in 93036b0. When I checked out the repo from one commit earlier (1b64538) and reran with the same input I got
{'var_a': 'F8.0', 'var_b': 'F8.2'}
Very grateful for any assistance with generating files without all those
.0
decimals.The text was updated successfully, but these errors were encountered: