Open In App

Limited rows selection with given column in Pandas | Python

Last Updated : 24 Oct, 2019
Comments
Improve
Suggest changes
10 Likes
Like
Report
Methods in Pandas like iloc[], iat[] are generally used to select the data from a given dataframe. In this article, we will learn how to select the limited rows with given columns with the help of these methods. Example 1: Select two columns
Output:
     Name Qualification
1  Princi            MA
2  Gaurav           MCA
3    Anuj           Phd
Example 2: First filtering rows and selecting columns by label format and then Select all columns.
Output:
Address          Delhi
Age                 27
Name               Jai
Qualification      Msc
Name: 0, dtype: object

Example 3: Select all or some columns, one to another using .iloc.
Output:
   Age    Name
0   27     Jai
1   24  Princi

Practice Tags :

Similar Reads