Learn Python
Learn Data Structure & Algorithm
Learn Numpy
Pandas Introduction
Pandas Series
Pandas DataFrame
Pandas Read Files
Pandas Some functions and properties
Pandas Math Function
Pandas Selection
Pandas Change Type
Pandas Concatenate & Split
Pandas Sorting
Pandas Filter
Pandas Data Cleaning
Pandas Group by
Pandas Time Series
Pandas Analysis 1
Pandas Analysis 2
Pandas Analysis 3
Matplotlib
Learn Seaborn
Learn Statistics
Learn Math
Learn MATLAB
Learn Machine learning
Learn Github
Learn OpenCV
Learn Deep Learning
Learn MySQL
Learn MongoDB
Learn Web scraping
Learn Excel
Learn Power BI
Learn Tableau
Learn Docker
Learn Hadoop
Id | Name | Group_name | Total_marks | Grade | Ranking | |
---|---|---|---|---|---|---|
0 | 01 | A | Science | 700 | A+ | 01 |
1 | 02 | B | Commerce | 618 | B+ | 02 |
2 | 03 | A | Science | 700 | A+ | 01 |
3 | 04 | D | Arts | 687 | A+ | 01 |
4 | 05 | E | Commerce | 611 | B+ | 02 |
5 | 06 | F | Arts | 599 | C+ | 03 |
6 | 07 | P | Science | 575 | C+ | 03 |
7 | 08 | F | Arts | 600 | C | 03 |
8 | 09 | I | Commerce | 550 | C+ | 03 |
9 | 10 | J | Science | 650 | A+ | 01 |
10 | 11 | K | Arts | 680 | A+ | 01 |
11 | 12 | L | Science | 570 | C+ | 03 |
12 | 13 | M | Arts | 599 | C+ | 03 |
13 | 14 | N | Commerce | 597 | C+ | 03 |
14 | 15 | O | Science | 697 | A+ | 01 |
15 | 16 | B | Arts | 570 | C+ | 03 |
16 | 17 | D | Science | 588 | C+ | 03 |
17 | 18 | E | Science | 687 | A+ | 01 |
18 | 19 | C | Commerce | 688 | A+ | 01 |
19 | 20 | P | Arts | 588 | C+ | 03 |
20 | 21 | C | Science | 619 | B+ | 02 |
21 | 22 | M | Commerce | 600 | B+ | 02 |
22 | 23 | P | Arts | 700 | A+ | 01 |
The sum () function is used to get the sum of the numeric column.
The max() function is used to get the maximum value of the numeric column.
The min() function is used to get the minimum value of the numeric column.
The mean() function is used to get the mean value of numeric columns.
The median() function is used to get the median value of numeric columns.
The mode() function is used to get the mode value of the categorical column.
The count() function is used to get the count of numeric columns.
The var() function is used to get the var of numeric columns.
Std() function is used to get the mean value of numeric columns.
Using aggregate() function we can apply some aggregation like sum, max, mix etc across one or more column.
Aggregation only can be applyed in numerical column.
Syntax:
DataFrame.aggregate(func, axis=0, *args, **kwargs)
Here,
function= string, dictionary, or list of string/callables.
axis= value 0(row) or 1(column)
In the dataset we have numerical and categorical columns. We know that aggregation only applied in numerical column. Because we are running aggregation on the whole dataset, so we are not defining any column name in the function but aggregate function will only take numerical columns for work. So we will see outputs for all the numerical columns present in the dataset.
Id | Total_marks | Ranking | |
---|---|---|---|
sum | 279 | 14473 | 47 |
max | 23 | 700 | 3 |
Id | Total_marks | Ranking | |
---|---|---|---|
sum | 279 | NaN | 47 |
max | NaN | 700 | NaN |
min | 1 | 550 | 1 |