Skip to content

split a df into parts #2236

@yakir12

Description

@yakir12

It would be great to be able to use filter with a view settings so I can cheaply extract a smaller df from an existing, larger, df, using some boolean test.

filter(boolean_test_per_row, df, view = true)

Likewise, one could also split a df by grouping:

d = DataFrame(a = [1,1,2,2,3,3], b = 1:6, c = rand(6))
gd = groupby(d, :a)
group_1 = gd[(a = 1,)]
group_1.b # works!

But what if the grouping results in multiple groups? How can we refer and act on that?

groups = gd[[(a = 1,), (a = 2,)]]
groups.b

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions