if len(df) > 0 code example Example: Returns the number of rows in this DataFrame Click to copy# Returns the number of rows in this DataFrame df.count() # 2