-
Notifications
You must be signed in to change notification settings - Fork 370
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
Functions taking collections of column names always require them to be in AbstractVectors #1769
Comments
We have recently switched The only question is whether it should be |
I think it is fine to do a general iterator, and implictly check the type. |
@nalimilan - we need a general decision here (I am OK with accepting a general iterator and doing a type check, which will be tricky but doable). The downside is that the code will not be type stable (but I think it will not be the end of the world as DataFrames.jl are not type stable anyway). |
I agree we should support any iterator where possible (even if there won't probably be any performance gain). In the present case we could probably just remove the type annotation and rely on the fact that the one for |
The trick is that normally we require homogeneous type in other methods (or in short: that symbols and numbers are not mixed). That is why I have said that we have do do a type check anyway. I think we should retain this guarantee. I do not see much sense to allow selection of |
Although we currently allow it for |
Yeah, but it sounds weird to make the code much more complex just to prevent that. With some functions things can go wrong if duplicates are passed, but that's not the case here. |
OK (in normal code it will probably not happen anyway). |
As discussed in #2156 we can start allowing passing tuple instead of a vector. Just note that you should not expect a huge performance gain here (anything that happens with the selector will allocate much more and take much more time) - so this would be just a convenience functionality to allow tuples. Is the request then still valid, or vectors are enough? |
I guess there is always static vectors. |
This is now supported with |
For example:
disallow_missing
,DataFrames.jl/src/dataframe/dataframe.jl
Line 991 in 8d6cd43
I wanted to use a tuple of column names,
because tuples are immutable, and have much better performance,
and I knew all the columns when i wrote the code.
cc: @glennmoy
The text was updated successfully, but these errors were encountered: