# Select SubdataFrame in groupDataFrame by symbol

**URL:** <https://discourse.julialang.org/t/select-subdataframe-in-groupdataframe-by-symbol/27463>\
**Category:** General Usage\
**Tags:** question\
**Created:** [August 12, 2019, 3:43pm UTC](https://discourse.julialang.org/t/select-subdataframe-in-groupdataframe-by-symbol/27463 "2019-08-12T15:43:47Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ErwanPiR](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/erwanpir/32/11434_2.png) [@ErwanPiR](https://discourse.julialang.org/u/ErwanPiR)\
**Post date:** [August 12, 2019, 3:43pm UTC](https://discourse.julialang.org/t/select-subdataframe-in-groupdataframe-by-symbol/27463/1 "2019-08-12T15:43:47Z")

</div>

Hi,

I haven’t found the way to select a specific SubDataFrame in a Grouped DataFrame.  
Let’s say you have the following dataframe

```julia
df = DataFrame(A = rand(5), B = ["type1", "type2", "type1", "Type3", "type2"])

```

that you group by with column B

```julia
dfg = groupby(df,:B)

```

If you want to acces to one subdataFrame you can use indexing

```julia
dfg[1]

```

But without checking the value in dfg[1] of column B, you don’t know which one is it…  
Is there a way to say I want the subdataFrame corresponding to B = “type2” ? Something like

```julia
dfg[B = "type2"]

```

or directly

```julia
dfg[Symbol("type2")]

```

Thanks for your help.
