Head

     

  • Head returns the rows from the top of DataFrame
  • By default Head returns top 5 rows
  • print(df.head())
  •  

    {% for c in range(colscount) %}
    {{headerdata[c]}}
    {% endfor %}
    {% for i in range(rowscount) %}
    {% for c in range(colscount) %}
    {{totalrows[i][c]}}
    {% endfor %}
    {% endfor %}

     

    Top Ten rows

  • Returns first ten rows of DataFrame
  • df.head(10)
  • {% for c in range(colscount) %}
    {{headerdata[c]}}
    {% endfor %}
    {% for i in range(rows) %}
    {% for c in range(colscount) %}
    {{tenrows[i][c]}}
    {% endfor %}
    {% endfor %}

     

    First ten rows and six columns of DataFrame

  • Returns first ten rows and six columns of DataFrame
  • {% for c in range(maxcolumn) %}
    {{headerdata[c]}}
    {% endfor %}
    {% for i in range(rows) %}
    {% for c in range(maxcolumn) %}
    {{tenrows[i][c]}}
    {% endfor %}
    {% endfor %}