Pandas — “Python Data Analysis Library //part — 2//”
I have already discussed 11 basic functions of pandas in my previous story.If you have not read that,you can have a look at it for more understanding.So here is the continuation story of it.
12)df.loc[row_number] : this function gives the content present in the mentioned row
if you want first three datas ,then follow the below picture.You can also give the number according to your requirement.I have attached some examples below for your understanding.The square bracket consists of rows and columns to be obtained separated by comma.
the above method of getting respective rows and columns is known as SLICING and DICING
13)df.sort_values(‘column_name’) : sorts the respective column in ascending order
aliter:
FILTERING
There are multiple ways to filter data inside a Dataframe:
- Using the filter() function
- Using boolean indexing
- Using the query() function
- Using the str.contains() function
- Using the isin() function
- Using the apply() function
if you want data along with the columns and rows,