Use DataFrame.drop and pass it a Series of index labels:
In [65]: df
Out[65]:
one two
one 1 4
two 2 3
three 3 2
four 4 1
In [66]: df.drop(df.index[[1,3]])
Out[66]:
one two
one 1 4
three 3 2
More Related Contents:
- Pandas percentage of total with groupby
- Scatter plots in Pandas/Pyplot: How to plot by category [duplicate]
- Using Pandas to pd.read_excel() for multiple worksheets of the same workbook
- How to add pandas data to an existing csv file?
- How to explode a list inside a Dataframe cell into separate rows
- Creating an empty Pandas DataFrame, then filling it?
- Modifying a subset of rows in a pandas dataframe
- Naming returned columns in Pandas aggregate function? [duplicate]
- Matplotlib DateFormatter for axis label not working
- How to plot multi-color line if x-axis is date time index of pandas
- Splitting timestamp column into separate date and time columns
- ‘utf-8’ codec can’t decode byte 0x92 in position 18: invalid start byte
- How can I use cumsum within a group in Pandas?
- How to group DataFrame by a period of time?
- Why does df.apply(tuple) work but not df.apply(list)?
- Plot multiple columns of pandas DataFrame on the bar chart
- Python: Random selection per group
- Keep selected column as DataFrame instead of Series
- How to get unique values from multiple columns in a pandas groupby
- Merge a list of pandas dataframes
- How do I delete a column that contains only zeros in Pandas?
- Pandas reindex dates in Groupby
- How to repeat a Pandas DataFrame?
- Pandas ParserError EOF character when reading multiple csv files to HDF5
- Get column name where value is something in pandas dataframe
- Format a number with commas to separate thousands
- Sorting the order of bars in pandas/matplotlib bar plots
- Pandas: Create missing combination rows with zero values
- Pythonic/efficient way to strip whitespace from every Pandas Data frame cell that has a stringlike object in it
- Pandas: select all dates with specific month and day