Skip to content

Commit ff0d799

Browse files
authored
Bk/clean exports (#2720)
1 parent 67ccc07 commit ff0d799

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

src/DataFrames.jl

-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ export AbstractDataFrame,
3131
Tables,
3232
allowmissing!,
3333
antijoin,
34-
by,
3534
columnindex,
3635
combine,
3736
completecases,
@@ -72,9 +71,6 @@ export AbstractDataFrame,
7271
unstack,
7372
valuecols
7473

75-
# TODO: remove these exports in year 2021
76-
export by, aggregate
77-
7874
if VERSION >= v"1.1.0-DEV.792"
7975
import Base.eachcol, Base.eachrow
8076
else

src/deprecated.jl

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
export by, aggregate
2+
13
by(args...; kwargs...) = throw(ArgumentError("by function was removed from DataFrames.jl. " *
24
"Use the `combine(groupby(...), ...)` or `combine(f, groupby(...))` instead."))
35

src/other/precompile.jl

+9-3
Original file line numberDiff line numberDiff line change
@@ -1579,9 +1579,15 @@ function precompile(all=false)
15791579
Base.precompile(Tuple{Reduce{typeof(max), Nothing, Nothing},Vector{Int},GroupedDataFrame{DataFrame}})
15801580
Base.precompile(Tuple{Type{OnCol},Vector{String},Vararg{AbstractVector{T} where T, N} where N})
15811581

1582-
combine(groupby(DataFrame(), []), identity)
1583-
innerjoin(DataFrame(v1=[]), DataFrame(v1=[]), on=:v1)
1584-
outerjoin(DataFrame(v1=[]), DataFrame(v1=[]), on=:v1)
1582+
for v in ([1, 2], [2, 1], [2, 2, 1]),
1583+
op in (identity, x -> string.(x), x -> PooledArrays.PooledArray(string.(x))),
1584+
on in (:v1, [:v1, :v2])
1585+
df = DataFrame(v1=op(v), v2=v)
1586+
combine(groupby(df, on), identity, :v1 => identity,
1587+
:v2 => ByRow(identity), :v2 => sum)
1588+
innerjoin(df, select(df, on), on=on)
1589+
outerjoin(df, select(df, on), on=on)
1590+
end
15851591
end
15861592
return nothing
15871593
end

0 commit comments

Comments
 (0)