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

Add method to writetable for DataArray? #360

Closed
randyzwitch opened this issue Sep 13, 2013 · 5 comments
Closed

Add method to writetable for DataArray? #360

randyzwitch opened this issue Sep 13, 2013 · 5 comments

Comments

@randyzwitch
Copy link
Contributor

It seems weird that you can only export a DataFrame and not a DataArray from within DataFrames (i.e. you have to use writedlm from Base to export an array). We could do:

function writetable(filename::String,
                    df::DataArray;
                    header::Bool = true,
                    separator::Char = getseparator(filename),
                    quotemark::Char = '"')
    io = open(filename, "w")
    printtable(io,
               DataFrame(df),
               separator = separator,
               quotemark = quotemark,
               header = header)
    close(io)
    return
end

Or, we could modify printtable to have a DataArray method to avoid the DataFrame(df) type conversion.

Of course, if I'm the only one that sees this as an issue, we can do nothing.

@StefanKarpinski
Copy link
Member

Only tangentially relevant, but @johnmyleswhite and I were just talking about the idea of splitting the DataArray type out if DataFrames into its own package (presumably called DataArrays). I think that we should definitely do this.

@randyzwitch
Copy link
Contributor Author

Really? What would be returned when you index a single column from a DataFrame? Would it just be an n x 1 DataFrame

@StefanKarpinski
Copy link
Member

DataFrames would depend on DataArrays but not vice versa. The pint is that there are use cases for the relatively simple functionality of DataArrays without all the rest of DataFrames.

@nfoti
Copy link
Contributor

nfoti commented Sep 13, 2013

I vote to break DataArrays out from DataFrames.

On Fri, Sep 13, 2013 at 11:44 AM, Stefan Karpinski <[email protected]

wrote:

Only tangentially relevant, but @johnmyleswhitehttps://github.com/johnmyleswhiteand I were just talking about the idea of splitting the DataArray type out
if DataFrames into its own package (presumably called DataArrays). I think
that we should definitely do this.


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

@randyzwitch
Copy link
Contributor Author

Thanks @StefanKarpinski, that makes sense.

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

3 participants