Skip to content

Commit

Permalink
Merge pull request #29 from TidierOrg/speed-boost-2
Browse files Browse the repository at this point in the history
  • Loading branch information
Karandeep Singh committed Aug 15, 2023
2 parents 35e4a3d + 04b8444 commit eee7e3e
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/TidierData.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ macro select(df, exprs...)
df_expr = quote
if $any_found_n || $any_found_row_number
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -129,7 +129,7 @@ macro transmute(df, exprs...)
df_expr = quote
if $any_found_n || $any_found_row_number
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -187,7 +187,7 @@ macro rename(df, exprs...)
df_expr = quote
if $any_found_n || $any_found_row_number
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -245,7 +245,7 @@ macro mutate(df, exprs...)
df_expr = quote
if $any_found_n || $any_found_row_number
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -303,7 +303,7 @@ macro summarize(df, exprs...)
df_expr = quote
if $any_found_n || $any_found_row_number
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -374,7 +374,7 @@ macro filter(df, exprs...)
df_expr = quote
if $any_found_n || $any_found_row_number
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -436,7 +436,7 @@ macro group_by(df, exprs...)

if $any_found_n || $any_found_row_number || any_expressions
if $(esc(df)) isa GroupedDataFrame
local df_copy = deepcopy($(esc(df)))
local df_copy = transform($(esc(df)); ungroup = false)
else
local df_copy = copy($(esc(df)))
end
Expand Down Expand Up @@ -566,7 +566,7 @@ macro distinct(df, exprs...)

# `@distinct()` uses a different pattern from the other macros
# because if the original DataFrame is grouped, it must be ungrouped
# and then regrouped, so there's no need to make a deepcopy.
# and then regrouped, so there's no need to make a copy up front.
# This is because `unique()` does not work on GroupDataFrames.
local df_copy = DataFrame($(esc(df)))
if $any_found_n
Expand Down

2 comments on commit eee7e3e

@kdpsingh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request updated: JuliaRegistries/General/89712

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v0.10.0 -m "<description of version>" eee7e3e7ae94cdc6e7e8df4efddefde2da101626
git push origin v0.10.0

Please sign in to comment.