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

avoid depwarn in eachcol #1614

Merged
merged 2 commits into from
Dec 4, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/DataFrames.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ export AbstractDataFrame,
disallowmissing!,
dropmissing,
dropmissing!,
eachcol,
eachrow,
eltypes,
groupby,
insertcols!,
Expand All @@ -58,6 +56,11 @@ export AbstractDataFrame,
unstack,
permutecols!

if VERSION >= v"1.1.0-DEV.792"
import Base.eachcol, Base.eachrow
else
export eachcol, eachrow
end

##############################################################################
##
Expand Down
2 changes: 1 addition & 1 deletion src/abstractdataframe/abstractdataframe.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ dump(df)
function Base.dump(io::IO, df::AbstractDataFrame, n::Int, indent)
println(io, typeof(df), " $(nrow(df)) observations of $(ncol(df)) variables")
if n > 0
for (name, col) in eachcol(df)
for (name, col) in eachcol(df, true)
print(io, indent, " ", name, ": ")
dump(io, col, n - 1, string(indent, " "))
end
Expand Down
2 changes: 1 addition & 1 deletion src/abstractdataframe/show.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function getmaxwidths(df::AbstractDataFrame,
undefstrwidth = ourstrwidth(Base.undef_ref_str)

j = 1
for (name, col) in eachcol(df)
for (name, col) in eachcol(df, true)
# (1) Consider length of column name
maxwidth = ourstrwidth(name)

Expand Down