Python Pandas: Get index of rows which column matches certain value

df.iloc[i] returns the ith row of df. i does not refer to the index label, i is a 0-based index. In contrast, the attribute index returns actual index labels, not numeric row-indices: or equivalently, You can see the difference quite clearly by playing with a DataFrame with a non-default index that does not equal to the row’s numerical position: If you want to use the index, … Read more

Python Pandas: Get index of rows which column matches certain value

df.iloc[i] returns the ith row of df. i does not refer to the index label, i is a 0-based index. In contrast, the attribute index returns actual index labels, not numeric row-indices: or equivalently, You can see the difference quite clearly by playing with a DataFrame with a non-default index that does not equal to the row’s numerical position: If you want to use the index, … Read more

What is an index in SQL?

An index is used to speed up searching in the database. MySQL have some good documentation on the subject (which is relevant for other SQL servers as well): http://dev.mysql.com/doc/refman/5.0/en/mysql-indexes.html An index can be used to efficiently find all rows matching some column in your query and then walk through only that subset of the table to … Read more