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

Bk/clean exports #2720

Merged
merged 5 commits into from
Apr 15, 2021
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
4 changes: 0 additions & 4 deletions src/DataFrames.jl
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ export AbstractDataFrame,
Tables,
allowmissing!,
antijoin,
by,
columnindex,
combine,
completecases,
Expand Down Expand Up @@ -72,9 +71,6 @@ export AbstractDataFrame,
unstack,
valuecols

# TODO: remove these exports in year 2021
export by, aggregate

if VERSION >= v"1.1.0-DEV.792"
import Base.eachcol, Base.eachrow
else
Expand Down
2 changes: 2 additions & 0 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export by, aggregate
bkamins marked this conversation as resolved.
Show resolved Hide resolved

by(args...; kwargs...) = throw(ArgumentError("by function was removed from DataFrames.jl. " *
"Use the `combine(groupby(...), ...)` or `combine(f, groupby(...))` instead."))

Expand Down
12 changes: 9 additions & 3 deletions src/other/precompile.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1579,9 +1579,15 @@ function precompile(all=false)
Base.precompile(Tuple{Reduce{typeof(max), Nothing, Nothing},Vector{Int},GroupedDataFrame{DataFrame}})
Base.precompile(Tuple{Type{OnCol},Vector{String},Vararg{AbstractVector{T} where T, N} where N})

combine(groupby(DataFrame(), []), identity)
innerjoin(DataFrame(v1=[]), DataFrame(v1=[]), on=:v1)
outerjoin(DataFrame(v1=[]), DataFrame(v1=[]), on=:v1)
for v in ([1, 2], [2, 1], [2, 2, 1]),
op in (identity, x -> string.(x), x -> PooledArrays.PooledArray(string.(x))),
on in (:v1, [:v1, :v2])
df = DataFrame(v1=op(v), v2=v)
combine(groupby(df, on), identity, :v1 => identity,
:v2 => ByRow(identity), :v2 => sum)
innerjoin(df, select(df, on), on=on)
outerjoin(df, select(df, on), on=on)
end
end
return nothing
end