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

CSV.DataFrame! no longer supported #778

Closed
ablaom opened this issue Nov 15, 2020 · 4 comments
Closed

CSV.DataFrame! no longer supported #778

ablaom opened this issue Nov 15, 2020 · 4 comments

Comments

@ablaom
Copy link
Contributor

ablaom commented Nov 15, 2020

      X = Tables.table(ones(1_000, 2))
      tmp = tempname()
      CSV.write(tmp, X)
      data = CSV.DataFrame!(CSV.File(tmp))
ERROR: UndefVarError: DataFrame! not defined
Stacktrace:
 [1] getproperty(::Module, ::Symbol) at ./Base.jl:26
 [2] top-level scope at REPL[14]:1

So how do we do this in 0.8? I couldn't see anything in the release notes, sorry.

@quinnj
Copy link
Member

quinnj commented Nov 15, 2020

Yes, sorry this wasn't more clear; the way to do this now is just CSV.read(file, DataFrame)

@ablaom ablaom closed this as completed Nov 15, 2020
@ablaom
Copy link
Contributor Author

ablaom commented Nov 16, 2020

Mmm. I'm still not getting this:

X = Tables.table(ones(1_000, 2))
tmp = tempname()
CSV.write(tmp, X)
data = CSV.read(CSV.File(tmp), DataFrame)

ERROR: MethodError: no method matching joinpath(::CSV.File{false})
Closest candidates are:
  joinpath(::AbstractString) at path.jl:244
  joinpath(::AbstractString, ::AbstractString...) at path.jl:289
Stacktrace:
 [1] stat(::CSV.File{false}) at ./stat.jl:109
 [2] isfile(::CSV.File{false}) at ./stat.jl:311
 [3] Header at /Users/anthony/.julia/packages/CSV/lIuxi/src/header.jl:90 [inlined]
 [4] CSV.File(::CSV.File{false}; header::Int64, normalizenames::Bool, datarow::Int64, skipto::Nothing, footerskip::Int64, transpose::Bool, comment::Nothing, use_mmap::Nothing, ignoreemptylines::Bool, select::Nothing, drop::Nothing, missingstrings::Array{String,1}, missingstring::String, delim::Nothing, ignorerepeated::Bool, quotechar::Char, openquotechar::Nothing, closequotechar::Nothing, escapechar::Char, dateformat::Nothing, dateformats::Nothing, decimal::UInt8, truestrings::Array{String,1}, falsestrings::Array{String,1}, type::Nothing, types::Nothing, typemap::Dict{Type,Type}, pool::Float64, lazystrings::Bool, strict::Bool, silencewarnings::Bool, debug::Bool, parsingdebug::Bool, kw::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/anthony/.julia/packages/CSV/lIuxi/src/file.jl:217
 [5] CSV.File(::CSV.File{false}) at /Users/anthony/.julia/packages/CSV/lIuxi/src/file.jl:217
 [6] read(::CSV.File{false}, ::Type{T} where T; copycols::Bool, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /Users/anthony/.julia/packages/CSV/lIuxi/src/CSV.jl:45
 [7] read(::CSV.File{false}, ::Type{T} where T) at /Users/anthony/.julia/packages/CSV/lIuxi/src/CSV.jl:42
 [8] top-level scope at REPL[27]:1

@ablaom ablaom reopened this Nov 16, 2020
@ablaom
Copy link
Contributor Author

ablaom commented Nov 16, 2020

I guess you mean CSV.read(tmp, DataFrame).

@ablaom ablaom closed this as completed Nov 16, 2020
@quinnj
Copy link
Member

quinnj commented Nov 16, 2020

Yep, sorry again that wasn't clear!

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

2 participants