How to view every n-th row in a DataFrame?
My DataFrame is a plane table of 1334400 x 22 entries. I would like to view every 21-th entire row.
Could anyone help?
df[1:21:nrow(df), :]
you might consider @views df[1:21:nrow(df), :]
to make this quicker and more memory efficient (depening on what you are doing afterwards)
Thanks. What speeks for nrow(df)
instead of just end
to set the boundaries?
Nothing actually - just didn’t think of that!