Dataframe.resample() works only with timeseries data. I cannot find a way of getting every nth row from non-timeseries data. What is the best method?
Dataframe.resample()
I'd use iloc, which takes a row/column slice, both based on integer position and following normal python syntax. If you want every 5th row:
iloc
df.iloc[::5, :]
1.4m articles
1.4m replys
5 comments
56.9k users