576576"""
577577 select!(df::DataFrame, args...; renamecols::Bool=true)
578578 select!(args::Base.Callable, df::DataFrame; renamecols::Bool=true)
579- select!(gd::GroupedDataFrame{DataFrame}, args...; ungroup::Bool=true, renamecols::Bool=true)
580- select!(f::Base.Callable, gd::GroupedDataFrame; ungroup::Bool=true, renamecols::Bool=true)
579+ select!(gd::GroupedDataFrame{DataFrame}, args...;
580+ ungroup::Bool=true, renamecols::Bool=true,
581+ nthreads::Int=DataFrames.nthreads())
582+ select!(f::Base.Callable, gd::GroupedDataFrame;
583+ ungroup::Bool=true, renamecols::Bool=true,
584+ nthreads::Int=DataFrames.nthreads())
581585
582586Mutate `df` or `gd` in place to retain only columns or transformations specified by `args...` and
583587return it. The result is guaranteed to have the same number of rows as `df` or
@@ -595,6 +599,11 @@ $TRANSFORMATION_COMMON_RULES
595599 column names should include the name of transformation functions or not.
596600- `ungroup::Bool=true` : whether the return value of the operation on `gd` should be a data
597601 frame or a `GroupedDataFrame`.
602+ - `nthreads::Int=DataFrames.nthreads()` : the number of CPU threads to use.
603+ Defaults to `1` unless [`DataFrames.nthreads!`](@ref) has been called with
604+ a different value. Passing a value higher than 1 currently has an effect only
605+ for some optimized grouped reductions. Values higher than `Threads.nthreads()`
606+ will be replaced with that value.
598607
599608See [`select`](@ref) for examples.
600609```
613622"""
614623 transform!(df::DataFrame, args...; renamecols::Bool=true)
615624 transform!(args::Callable, df::DataFrame; renamecols::Bool=true)
616- transform!(gd::GroupedDataFrame{DataFrame}, args...; ungroup::Bool=true, renamecols::Bool=true)
617- transform!(f::Base.Callable, gd::GroupedDataFrame; ungroup::Bool=true, renamecols::Bool=true)
625+ transform!(gd::GroupedDataFrame{DataFrame}, args...;
626+ ungroup::Bool=true, renamecols::Bool=true,
627+ nthreads::Int=DataFrames.nthreads())
628+ transform!(f::Base.Callable, gd::GroupedDataFrame;
629+ ungroup::Bool=true, renamecols::Bool=true,
630+ nthreads::Int=DataFrames.nthreads())
618631
619632Mutate `df` or `gd` in place to add columns specified by `args...` and return it.
620633The result is guaranteed to have the same number of rows as `df`.
@@ -627,6 +640,11 @@ $TRANSFORMATION_COMMON_RULES
627640 column names should include the name of transformation functions or not.
628641- `ungroup::Bool=true` : whether the return value of the operation on `gd` should be a data
629642 frame or a `GroupedDataFrame`.
643+ - `nthreads::Int=DataFrames.nthreads()` : the number of CPU threads to use.
644+ Defaults to `1` unless [`DataFrames.nthreads!`](@ref) has been called with
645+ a different value. Passing a value higher than 1 currently has an effect only
646+ for some optimized grouped reductions. Values higher than `Threads.nthreads()`
647+ will be replaced with that value.
630648
631649See [`select`](@ref) for examples.
632650"""
@@ -644,10 +662,10 @@ end
644662 select(df::AbstractDataFrame, args...; copycols::Bool=true, renamecols::Bool=true)
645663 select(args::Callable, df::DataFrame; renamecols::Bool=true)
646664 select(gd::GroupedDataFrame, args...; copycols::Bool=true, keepkeys::Bool=true,
647- ungroup::Bool=true, renamecols::Bool=true, nthreads::Int=1 )
665+ ungroup::Bool=true, renamecols::Bool=true, nthreads::Int=DataFrames.nthreads() )
648666 select(f::Base.Callable, gd::GroupedDataFrame; copycols::Bool=true,
649667 keepkeys::Bool=true, ungroup::Bool=true,
650- renamecols::Bool=true, nthreads::Int=1 )
668+ renamecols::Bool=true, nthreads::Int=DataFrames.nthreads() )
651669
652670Create a new data frame that contains columns from `df` or `gd` specified by
653671`args` and return it. The result is guaranteed to have the same number of rows
@@ -665,9 +683,11 @@ $TRANSFORMATION_COMMON_RULES
665683 data frame.
666684- `ungroup::Bool=true` : whether the return value of the operation on `gd` should be a data
667685 frame or a `GroupedDataFrame`.
668- - `nthreads::Int=1` : the number of CPU threads to use. Passing a value higher than 1
669- currently has an effect only for some optimized grouped reductions. Values higher than
670- `Threads.nthreads()` will be replaced with that value.
686+ - `nthreads::Int=DataFrames.nthreads()` : the number of CPU threads to use.
687+ Defaults to `1` unless [`DataFrames.nthreads!`](@ref) has been called with
688+ a different value. Passing a value higher than 1 currently has an effect only
689+ for some optimized grouped reductions. Values higher than `Threads.nthreads()`
690+ will be replaced with that value.
671691
672692# Examples
673693```jldoctest
@@ -863,10 +883,10 @@ end
863883 transform(f::Callable, df::DataFrame; renamecols::Bool=true)
864884 transform(gd::GroupedDataFrame, args...; copycols::Bool=true,
865885 keepkeys::Bool=true, ungroup::Bool=true,
866- renamecols::Bool=true, nthreads::Int=1 )
886+ renamecols::Bool=true, nthreads::Int=DataFrames.nthreads() )
867887 transform(f::Base.Callable, gd::GroupedDataFrame; copycols::Bool=true,
868888 keepkeys::Bool=true, ungroup::Bool=true,
869- renamecols::Bool=true, nthreads::Int=1 )
889+ renamecols::Bool=true, nthreads::Int=DataFrames.nthreads() )
870890
871891Create a new data frame that contains columns from `df` or `gd` plus columns
872892specified by `args` and return it. The result is guaranteed to have the same
@@ -883,9 +903,11 @@ $TRANSFORMATION_COMMON_RULES
883903 data frame.
884904- `ungroup::Bool=true` : whether the return value of the operation on `gd` should be a data
885905 frame or a `GroupedDataFrame`.
886- - `nthreads::Int=1` : the number of CPU threads to use. Passing a value higher than 1
887- currently has an effect only for some optimized grouped reductions. Values higher than
888- `Threads.nthreads()` will be replaced with that value.
906+ - `nthreads::Int=DataFrames.nthreads()` : the number of CPU threads to use.
907+ Defaults to `1` unless [`DataFrames.nthreads!`](@ref) has been called with
908+ a different value. Passing a value higher than 1 currently has an effect only
909+ for some optimized grouped reductions. Values higher than `Threads.nthreads()`
910+ will be replaced with that value.
889911
890912Note that when the first argument is a `GroupedDataFrame`, `keepkeys=false`
891913is needed to be able to return a different value for the grouping column:
@@ -934,10 +956,10 @@ end
934956 combine(f::Callable, df::AbstractDataFrame; renamecols::Bool=true)
935957 combine(gd::GroupedDataFrame, args...;
936958 keepkeys::Bool=true, ungroup::Bool=true,
937- renamecols::Bool=true, nthreads::Int=1 )
959+ renamecols::Bool=true, nthreads::Int=DataFrames.nthreads() )
938960 combine(f::Base.Callable, gd::GroupedDataFrame;
939961 keepkeys::Bool=true, ungroup::Bool=true,
940- renamecols::Bool=true, nthreads::Int=1 )
962+ renamecols::Bool=true, nthreads::Int=DataFrames.nthreads() )
941963
942964Create a new data frame that contains columns from `df` or `gd` specified by
943965`args` and return it. The result can have any number of rows that is determined
@@ -952,9 +974,11 @@ $TRANSFORMATION_COMMON_RULES
952974 data frame.
953975- `ungroup::Bool=true` : whether the return value of the operation on `gd` should be a data
954976 frame or a `GroupedDataFrame`.
955- - `nthreads::Int=1` : the number of CPU threads to use. Passing a value higher than 1
956- currently has an effect only for some optimized grouped reductions. Values higher than
957- `Threads.nthreads()` will be replaced with that value.
977+ - `nthreads::Int=DataFrames.nthreads()` : the number of CPU threads to use.
978+ Defaults to `1` unless [`DataFrames.nthreads!`](@ref) has been called with
979+ a different value. Passing a value higher than 1 currently has an effect only
980+ for some optimized grouped reductions. Values higher than `Threads.nthreads()`
981+ will be replaced with that value.
958982
959983# Examples
960984```jldoctest
0 commit comments