-
Notifications
You must be signed in to change notification settings - Fork 20
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
Names are dropped when converting a NamedArray to a DataFrame #76
Comments
This is definitely not specific to FreqTables (implementing the method there would be type piracy), so it should either use Tables.jl or a special DataFrames constructor. Tables.jl doesn't support arrays, so that leaves DataFrames. Though there's some tension with the way Another consideration is that a different conversion rule can be considered for higher-dimensional |
Thank for the explanations and the good points @nalimilan. I agree the transformation of higher dimensional arrays performed by R's So, indeed there is some tension between the intuitive 2 dimensional solution and the higher dimension tables - the function I wrote above would ignore higher dimensions. One possibility would be to stack by default, even 2d arrays. A user can always unstack if necessary. |
This should be solved with #99 for arbitrary dimensions. |
I ran into a problem when writing the result of
freqtable
to a CSV file: I converted to DataFrame and lost all the names.The solution I came up with was to overwrite CSV.write follows:
I'd be willing to help, submit a PR or else, depending on what suggestions.
Please let me know what would help and make sense. Thanks!
The text was updated successfully, but these errors were encountered: