Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to get row number in dataframe in pandas?

>>> df[df['LastName'] == 'Smith'].index
Int64Index([1], dtype='int64')
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #row #number #dataframe
ADD COMMENT
Topic
Name
8+2 =