JuliaParallel / JuliaParallel/DTables.jl

reduce on GroupedDTable of DTable of DataFrames returns NamedTuple

Open
#65 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Julia
Stars
81
Forks
2
Avg merge
2h 31m
Merged PRs (30d)
1

Description

I think it should be returning a DataFrame, preserving the inner type

here an example
```julia
using Distributed
# add two further julia processes which could run on other machines
addprocs(2, exeflags="--threads=2")
# Distributed.@everywhere execute code on all machines
@everywhere using Dagger # needed for all_processors
# Dagger uses both Threads and Machines as processes
Dagger.all_processors()

using DTables, DataFrames, CSV

url = "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv"
files = [url, url, url, url, url]

d = DTable(DataFrame ∘ CSV.File ∘ download, files)
g = DTables.groupby(d, :species)
r = reduce(+, g, cols=[:sepal_width])
fetch(r)
# returns
# (species = String15["virginica", "setosa", "versicolor"], result_sepal_width = [743.5, 856.9999999999998, 692.4999999999995])
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.