danfojs
danfojs copied to clipboard
[Question] How to get first and last data using group by
trafficstars
hi i'm looking for this solution https://stackoverflow.com/questions/62373692/how-do-you-convert-1-minute-open-high-low-close-data-to-another-timeframefx-5 using this library. but i can't find first and last data grouping.
@tarikhagustia
for any groupby variable you should be able to do this
let grpby = df.groupby("column")
grpby.first() // first of the grouping
grpby.last() // last of the grouping
@tarikhagustia
for any groupby variable you should be able to do this
let grpby = df.groupby("column") grpby.first() // first of the grouping grpby.last() // last of the grouping
but how to use in .agg function?