Data Extraction\Selection from DataFrame

  • We can extract the data from below mentioned methods
  •  

     

  • iloc: enables the user to extract the data based on index numbers of rows and columns
  •  

  • loc: enables the user to extract the data based on labels of rows and columns
  •  

  • ix: enables the user to extract the data based on indexnumbers\labels of rows and columns
  •  

    ix

    Print 11 rows and columns from Open to LTP

     

  • print(df.ix[0:11,'Open':'LTP'])
  •  

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