Suppose I create the following dataframe
using DataFrames
df = DataFrame(A = rand(500), B = repeat(1:10, inner=50), C = 1:500)
and I can do a groupby:
grouped_df = groupby(df,"B")
I will end up with 10 groups. How can I choose, say, the third element of each group, and combine them into a new dataframe? That is, I would like a new dataframe of 10 rows, with each row being the third element of each of the groups?
I looked into combine, but couldn't find a solution. Can I get a hint?