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

DataFrame(load("file.xlsx", "sheetname")) not working #33

Open
cossio opened this issue May 1, 2019 · 1 comment · Fixed by JuliaData/Tables.jl#89
Open

DataFrame(load("file.xlsx", "sheetname")) not working #33

cossio opened this issue May 1, 2019 · 1 comment · Fixed by JuliaData/Tables.jl#89

Comments

@cossio
Copy link

cossio commented May 1, 2019

After a recent update in DataFrames v0.18, the line DataFrame(load("file.xlsx", "sheetname")) no longer works to read an Excel file into a DataFrame. I get the following error:

ArgumentError: no default Tables.columns implementation for type: ExcelFiles.ExcelFile

Stacktrace:
[1] #DataFrame#365(::Bool, ::Type, ::ExcelFiles.ExcelFile) at .julia/packages/Tables/qlc3J/src/fallbacks.jl:156
[2] DataFrame(::ExcelFiles.ExcelFile) at .julia/packages/DataFrames/dXFYy/src/other/tables.jl:20

It seems ExcelFiles needs to update to use the Tables API.

@nalimilan
Copy link

AFAICT that's a problem in Tables.jl. Since JuliaData/Tables.jl#84, Tables.columns checks Base.isiterable(T) instead of istable(x), which doesn't take into account TableTraits.isiterabletable(x). Yet ExcelFile defines the latter, but not the former.

I have a possible fix at JuliaData/Tables.jl#89.

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

Successfully merging a pull request may close this issue.

2 participants