CurrentModule = DataFrames
By default, selected operations in DataFrames.jl automatically use multiple threads
when available. Multi-threading is task-based and implemented using the @spawn
macro from Julia Base. Tasks are therefore scheduled on the :default threadpool.
Functions that take user-defined functions and may run it in parallel
accept a threads keyword argument which allows disabling multithreading
when the provided function requires serial execution or is not thread-safe.
This is a list of operations that currently make use of multi-threading:
DataFrameconstructor withcopycols=true; also recursively all functions that call this constructor, e.g.copy.getindexwhen multiple columns are selected.groupby(both when hashing is required and when fast path usingDataAPI.refpoolis used).*joinfunctions for composing output data frame (but currently not for finding matching rows in joined data frames).combine,select[!], andtransform[!]onGroupedDataFramewhen either of the conditions below is met:- multiple transformations are performed (each transformation is spawned in a separate task)
- a transformation produces one row per group and the passed transformation is a custom function (i.e. not for standard reductions, which use optimized single-threaded methods).
dropmissingwhen the provided data frame has more than 1 column andview=false(subsetting of individual columns is spawned in separate tasks).
In general to ensure that multi-threading is used Julia process must be started with more than one thread. Some operations turn on multi-threading only if enough rows are present in the processed data frame. (the exact threshold when multi-threading is enabled is considered to be undefined and might change in the future).
Except for the list above, where multi-threading is used automatically,
all functions provided by DataFrames.jl that update a data frame are not thread safe.
This means that while they can be called from any thread, the caller is responsible
for ensuring that a given DataFrame object is never modified by one thread while
others are using it (either for reading or writing). Using the same DataFrame
at the same time from different threads is safe as long as it is not modified.
Pages = ["functions.md"]
allcombinations
copy
similar
describe
isempty
length
ncol
ndims
nrow
rownumber
show
size
names
propertynames
rename
rename!
append!
combine
fillcombinations
flatten
hcat
insert!
insertcols
insertcols!
invpermute!
mapcols
mapcols!
permute!
prepend!
push!
pushfirst!
reduce
repeat
repeat!
reverse
reverse!
select
select!
shuffle
shuffle!
table_transformation
transform
transform!
vcat
stack
unstack
permutedims
issorted
order
sort
sort!
sortperm
antijoin
crossjoin
innerjoin
leftjoin
leftjoin!
outerjoin
rightjoin
semijoin
get
groupby
groupcols
groupindices
keys
parent
proprow
valuecols
allunique
deleteat!
empty
empty!
filter
filter!
keepat!
first
last
nonunique
only
pop!
popat!
popfirst!
resize!
subset
subset!
unique
unique!
allowmissing
allowmissing!
completecases
disallowmissing
disallowmissing!
dropmissing
dropmissing!
eachcol
eachrow
values
pairs
Iterators.partition
isapprox
metadata
metadatakeys
metadata!
deletemetadata!
emptymetadata!
colmetadata
colmetadatakeys
colmetadata!
deletecolmetadata!
emptycolmetadata!