Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

num_decimals zero for non-integer data #2

Open
aflaxman opened this issue Feb 21, 2013 · 7 comments
Open

num_decimals zero for non-integer data #2

aflaxman opened this issue Feb 21, 2013 · 7 comments

Comments

@aflaxman
Copy link

I've run into an issue analyzing some NHANES data that might be a problem in other datasets as well. xport finds columns with num_decimals == 0 when the data is not an integer. I can't tell from the specification file if the .xpt file is in error here, but I've created a minimal example of the problem so that you can investigate further if you have time.

http://nbviewer.ipython.org/5004964/

@jcushman
Copy link
Owner

Thanks for the excellent test case. I may or may not have time to look into it soon. In the meantime, if you have a minute, I'd be interested to know whether the same bug applies to this fork:

https://github.com/selik/xport/blob/master/xport/xport.py

selik did a ton of great cleanup work that should really be merged back in, and may have fixed whatever's breaking here in the process.

@aflaxman
Copy link
Author

It appears to fixed in selik’s fork, which may also handle missing values better. Thanks for your and selik’s work on this!

From: jcushman [mailto:[email protected]]
Sent: Thursday, February 21, 2013 6:28 AM
To: jcushman/xport
Cc: Abraham Flaxman
Subject: Re: [xport] num_decimals zero for non-integer data (#2)

Thanks for the excellent test case. I may or may not have time to look into it soon. In the meantime, if you have a minute, I'd be interested to know whether the same bug applies to this fork:

https://github.com/selik/xport/blob/master/xport/xport.py

selik did a ton of great cleanup work that should really be merged back in, and may have fixed whatever's breaking here in the process.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-13890999.

@jcushman
Copy link
Owner

Great -- I'll take this as a reminder to merge that in.

On Thu, Feb 21, 2013 at 9:33 AM, Abraham Flaxman
[email protected]:

It appears to fixed in selik’s fork, which may also handle missing values
better. Thanks for your and selik’s work on this!

From: jcushman [mailto:[email protected]]
Sent: Thursday, February 21, 2013 6:28 AM
To: jcushman/xport
Cc: Abraham Flaxman
Subject: Re: [xport] num_decimals zero for non-integer data (#2)

Thanks for the excellent test case. I may or may not have time to look
into it soon. In the meantime, if you have a minute, I'd be interested to
know whether the same bug applies to this fork:

https://github.com/selik/xport/blob/master/xport/xport.py

selik did a ton of great cleanup work that should really be merged back
in, and may have fixed whatever's breaking here in the process.


Reply to this email directly or view it on GitHub<
https://github.com/jcushman/xport/issues/2#issuecomment-13890999>.


Reply to this email directly or view it on GitHubhttps://github.com//issues/2#issuecomment-13891356.

@wdarsono
Copy link

Hi Jack, thanks for the great work!

I am relatively new to Python (and Github).
I tried both the original xport.py and the fork from Selik. In my case, in the created csv file, all the table entry with no content (empty) is replaced by 0.
1). Can you advise how can we keep the empty cell as what it is (i.e. no value)?
2). Also, can you please advise how can I include the column name in the created csv file?

Many thanks,
Willie

@sergeyf
Copy link

sergeyf commented Oct 8, 2015

Hi - I just had the problem where floats were encoded as ints. I used the version provided here: https://pypi.python.org/pypi/xport/

@selik
Copy link

selik commented Nov 9, 2016

@sergeyf Do you mind making a new issue for this on my repo (https://github.com/selik/xport/issues), if it's still a problem?

@selik
Copy link

selik commented Nov 9, 2016

@wdarsono I'm happy to help if this is still bothering you. Check out the latest version (https://github.com/selik/xport/).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants