Skip to content

Commit

Permalink
Import groupby from DataAPI, remove by and aggregate (#3422)
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins authored Jan 25, 2024
1 parent 1683da5 commit d7f27e6
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@
* Correctly handle non-standard integers when converting them to `BigInt`
([#3419](https://github.com/JuliaData/DataFrames.jl/issues/3419))

## Removed deprecations

* The `by` and `aggregate` functions that were deprecated before 1.0
release are now removed.
([#3422](https://github.com/JuliaData/DataFrames.jl/issues/3422))

# DataFrames.jl v1.6.1 Release Notes

Expand Down
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Unicode = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"
CategoricalArrays = "0.10.0"
Combinatorics = "1.0.2"
Compat = "4.2"
DataAPI = "1.15.0"
DataAPI = "1.16.0"
DataStructures = "0.18"
DataValues = "0.4.13"
InlineStrings = "1.3.0"
Expand Down
1 change: 1 addition & 0 deletions src/DataFrames.jl
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ import DataAPI,
DataAPI.Between,
DataAPI.Cols,
DataAPI.describe,
DataAPI.groupby,
DataAPI.innerjoin,
DataAPI.outerjoin,
DataAPI.rightjoin,
Expand Down
8 changes: 0 additions & 8 deletions src/deprecated.jl
Original file line number Diff line number Diff line change
@@ -1,11 +1,3 @@
export by, aggregate

# TODO: remove definitions in 2.0 release
by(args...; kwargs...) = throw(ArgumentError("by function was removed from DataFrames.jl. " *
"Use the `combine(groupby(...), ...)` or `combine(f, groupby(...))` instead."))
aggregate(args...; kwargs...) = throw(ArgumentError("aggregate function was removed from DataFrames.jl. " *
"Use the `combine` function instead."))

# TODO: remove deprecation in 2.0 release
import Base.delete!
@deprecate delete!(df::DataFrame, inds) deleteat!(df::DataFrame, inds)
5 changes: 0 additions & 5 deletions test/deprecated.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,6 @@ using Test, DataFrames, CategoricalArrays

const = isequal

@testset "by and aggregate" begin
@test_throws ArgumentError by()
@test_throws ArgumentError aggregate()
end

@testset "indicator in joins" begin
name = DataFrame(ID=[1, 2, 3], Name=["John Doe", "Jane Doe", "Joe Blogs"])
job = DataFrame(ID=[1, 2, 4], Job=["Lawyer", "Doctor", "Farmer"])
Expand Down

0 comments on commit d7f27e6

Please sign in to comment.