Skip to content

It seems Pandas.jl does not correctly support Tables.jl interface #77

@bkamins

Description

@bkamins

Having this source:

julia> using CSV, Pandas, Tables

julia> file = IOBuffer("""Temp;Val;Gr
       20;7863;1
       100;7834;1
       200;7803;1""")
IOBuffer(data=UInt8[...], readable=true, writable=false, seekable=true, append=false, size=43, maxsize=Inf, ptr=1, mark=-1)

this is incorrect:

julia> CSV.File(file, types=[Float64, Float64, Int]) |> DataFrame
       0       1    2
0   20.0  7863.0  1.0
1  100.0  7834.0  1.0
2  200.0  7803.0  1.0

but it should be:

julia> CSV.File(file, types=[Float64, Float64, Int]) |> columntable
(Temp = [20.0, 100.0, 200.0], Val = [7863.0, 7834.0, 7803.0], Gr = [1, 1, 1])

or:

julia> CSV.File(file, types=[Float64, Float64, Int]) |> columntable |> pairs |> DataFrame
    Temp     Val  Gr
0   20.0  7863.0   1
1  100.0  7834.0   1
2  200.0  7803.0   1

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions