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

Import groupby from DataAPI, remove by and aggregate #3422

Merged
merged 1 commit into from
Jan 25, 2024
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
5 changes: 5 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@
* Correctly index `eachrow` and `eachcol` with `CartesianIndex`
([#3413](https://github.com/JuliaData/DataFrames.jl/issues/3413))

## 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
Loading