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

Change deprecation warning for CSV.read #687

Merged
merged 1 commit into from
Jul 28, 2020
Merged

Change deprecation warning for CSV.read #687

merged 1 commit into from
Jul 28, 2020

Commits on Jul 10, 2020

  1. Change deprecation warning for CSV.read

    Fixes JuliaData/DataFrames.jl#2309. After much
    discussion, people really like the `CSV.read` function call naming, so
    it was decided to keep it around, while still allowing a break from
    DataFrames.jl as a dependency.
    
    I also realized that `CSV.read` does indeed provide one bit of
    value/functionality: we can wrap `CSV.File` in `Tables.CopiedColumns`.
    What this means is that columnar sinks can safely use the columns passed
    without needing to make copies; i.e. they can assume ownership of the
    columns. In `CSV.read`, the user is essentially saying, "I want to make
    a `CSV.File` and pass it directly to `sink`" which also implies that
    `CSV.File` doesn't need to "own" its own columns.
    
    The only question left in my mind is, with the 1.0 release, what to do
    with `CSV.read(file)` when no `sink` argument is passed. Suggestions
    have included just returning a `CSV.File`, since it's a valid table
    anyway. Or allowing DataFrames.jl to define the no-sink-arg version and
    return a `DataFrame`; that one's a bit awkward as a form of "blessed"
    type piracy, but could also be useful for users as convenience (they
    just have to remember to do `using DataFrames` before trying to use it).
    The other awkward part is that we're currently warning users of the
    deprecation and that they should explicitly spell out `DataFrame`
    whereas we might not actually require that.
    quinnj committed Jul 10, 2020
    Configuration menu
    Copy the full SHA
    ac3761d View commit details
    Browse the repository at this point in the history