extract a row from a dataframe in python code example Example 1: delete a row in pandas dataframe df.drop(df.index[2]) Example 2: how to get a row from a dataframe in python df.iloc[[index]]