-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DataFrame constructor raises exception with masked recarray #3478
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
Comments
this is not a good way of doing this, |
@jreback, I can't tell whether you're critiquing my particular implementation (#3479), or the existing implementation. I will comment as if you're critiquing my PR: Admittedly, for efficiency, my solution is slightly slower for non-masked record arrays, because it calls If you're talking about the existing code (though this also applies to my PR), it's unnecessary to explicitly use |
I was referring to your PR. you would be suprised about performance. We spend an inordinate amount of time trying to avoid bottlenecks. This is probably not a big deal, but it is easily avoided, by putting this under the I am not exactly sure what Why would you not put all of the Masked stuff in a single if? |
So let's discuss this over at #3479. |
@jnothman getting ready to put this in (I am using your tests, but implementing slightly different). is the intent of the fill value in a rec array to provide an immediate fillna on the Nan? e.g. say you construct a DataFrame then ends of having NaN (say because you pass in an explicity index/columns) DataFrames don't normally carry around a fill value, so would you a) drop it, b) immediately fill with it, c) have an option for this? we do a) with masked arrays IIRC now |
@jnothman sorry...i realize it is option b) on masked arrays.....will do the same then |
The
DataFrame
constructor supports numpy's ndarray of primitive type, recarray (or structured array) or a masked array of simple type. It breaks when given a masked recarray:Tested at latest public release and HEAD.
The text was updated successfully, but these errors were encountered: