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:
df.iloc[::5, :]
More Related Contents:
- Fast punctuation removal with pandas
- How to one-hot-encode from a pandas column containing a list?
- Skip rows during csv import pandas
- Rename Pandas DataFrame Index
- What is the fastest way to upload a big csv file in notebook to work with python pandas?
- How to check if any value is NaN in a Pandas DataFrame
- pandas dataframe groupby datetime month
- Pandas counting and summing specific conditions
- vlookup in Pandas using join
- Use AWS Glue Python with NumPy and Pandas Python Packages
- forward fill specific columns in pandas dataframe
- pandas to_csv output quoting issue
- How can I replicate rows in Pandas?
- pandas.merge: match the nearest time stamp >= the series of timestamps
- pandas – get most recent value of a particular column indexed by another column (get maximum value of a particular column indexed by another column)
- How to create a DataFrame of random integers with Pandas?
- add a row at top in pandas dataframe [duplicate]
- Pandas: append dataframe to another df
- Error: The truth value of a Series is ambiguous – Python pandas
- Computing diffs within groups of a dataframe
- Specifying date format when converting with pandas.to_datetime
- Is it possible to add a string as a legend item in matplotlib
- Nested Dictionary to MultiIndex pandas DataFrame (3 level)
- KeyError when indexing Pandas dataframe
- countplot with normalized y axis per group
- Check if certain value is contained in a dataframe column in pandas [duplicate]
- double quoted elements in csv cant read with pandas
- Pandas: Find rows which don’t exist in another DataFrame by multiple columns
- Resample time series in pandas to a weekly interval
- how to understand closed and label arguments in pandas resample method?