0% found this document useful (0 votes)
52 views

Data Handling Using Pandas-II - Part-I

This document discusses descriptive statistics and functions in pandas such as max(), min(), count(), mean(), sum(), median(), and mode(). It explains that descriptive statistics involves summarizing and organizing data so that it can be easily understood. It then provides the syntax and usage of each pandas function to return aggregate values like maximum, minimum, number of values, arithmetic mean, addition, middle value, and most repeated value from a column or row in a dataframe.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views

Data Handling Using Pandas-II - Part-I

This document discusses descriptive statistics and functions in pandas such as max(), min(), count(), mean(), sum(), median(), and mode(). It explains that descriptive statistics involves summarizing and organizing data so that it can be easily understood. It then provides the syntax and usage of each pandas function to return aggregate values like maximum, minimum, number of values, arithmetic mean, addition, middle value, and most repeated value from a column or row in a dataframe.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

Unit-2-Data Handling using

Pandas-II

Descriptive Statistics
Statistics is a branch of mathematics that deals with

collecting, interpreting, organization and interpretation of

data. Descriptive statistics involves summarizing and organizing

the data so that it can be easily understood.

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR


max()

It returns the maximum value from a column of a data frame or series.

Syntax-

df[‘columnname’].max()

Or

df.max(axis=0) returns the maximum value of every column

Or

df.max(axis=1) returns the maximum value of every row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR


min()

It returns the minimum value from a column of a data frame or series.

Syntax-

df[‘columnname’].min()

Or

df.min (axis=0) returns the minimum value of every column

Or

df.min(axis=1) returns the minimum value of every row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR


3-count()

It returns the number of values present in a column of a data frame or


series.

Syntax-

df[‘columnname’].count()

Or

df.count(axis=0) returns the number of value in each column

Or

df.count(axis=1) returns the number of value in each row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR


4- mean()

It is used to return the arithmetic mean of a given set of numbers,


mean of a data frame, mean of a column, mean of rows.

Syntax-

df[‘columnname’].mean()

Or

df.mean(axis=0) returns the mean of each column

Or

df.mean(axis=1) returns the mean of each row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR [SHIFT-2]
5- sum()

It is used to return the addition of all the values of a particular column


of a data frame or a series .

Syntax-

df[‘columnname’].sum()

Or

df.sum (axis=0) returns the sum of each column

Or

df.sum (axis=1) returns the sum of each row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR [SHIFT-2]
6- median()

It is used to return the middle value or median of a given set of numbers,


median of a data frame, median of a column, median of rows.

Syntax-

df[‘columnname’].median()

Or

df.median(axis=0) returns the median of each column

Or

df.median(axis=1) returns the median of each row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR [SHIFT-2]
7- mode()

It is used to return the mode or most repeated value of a given set of


numbers, mode of a data frame, mode of a column, mode of rows.

Syntax-

df[‘columnname’].mode()

Or

df.mode(axis=0) returns the mode of each column

Or

df.mode(axis=1) returns the mode of each row

CREATED BY: PRAKASH KUMAR DEWANGAN, PGT (CS) KV NO.1 RAIPUR [SHIFT-2]

You might also like