-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
More @mutate
testing fun π this is more of a behavior question rather than a bug.
In dplyr
, you can drop columns using mutate
by passing NULL
. This is news to me, and I actually only learned this from tests from the source code.
For example:
library(dplyr)
df <- tibble(x = 1, y = 2)
df |> mutate(y = NULL)
#> # A tibble: 1 Γ 1
#> x
#> <dbl>
#> 1 1
In Tidier
, I'd imagine that the closest behavior would be something like this:
using Tidier
using DataFrames
df = DataFrame(x = 1:3, y = 1:3)
@mutate(df, y = nothing)
But this doesn't drop the column, rather it just replaces y
with a column of type nothing
3Γ2 DataFrame
Row β x y
β Int64 Nothing
ββββββΌββββββββββββββββ
1 β 1
2 β 2
3 β 3
Is dropping a column this way something that should be supported?
kdpsingh
Metadata
Metadata
Assignees
Labels
No labels