Facebook Page Twitter Page LinkedIn Page
× Pandas Tutorial Pandas Resources


The Pandas DataFrame has a number of built-in functions that are always available for use. For example, sum() function is used to get the sum of all values over the specified axis. The most frequently used functions of pandas dataframe are listed below:

Pandas - DataFrame Functions

Binary operator Functions

FunctionDescription
add() Returns addition of dataframe and argument, element-wise (binary operator add).
sub() Returns subtraction of dataframe and argument, element-wise (binary operator sub).
mul() Returns multiplication of dataframe and argument, element-wise (binary operator mul).
div() Returns floating division of dataframe and argument, element-wise (binary operator truediv).
truediv() Returns floating division of dataframe and argument, element-wise (binary operator truediv).
floordiv() Returns integer division of dataframe and argument, element-wise (binary operator floordiv).
mod() Returns modulo of dataframe and argument, element-wise (binary operator mod).
pow() Returns exponential power of dataframe and argument, element-wise (binary operator pow).
lt() Get less than of dataframe and argument, element-wise (binary operator lt).
gt() Get greater than of dataframe and argument, element-wise (binary operator gt).
le() Get less than equal to of dataframe and argument, element-wise (binary operator le).
ge() Get greater than equal to of dataframe and argument, element-wise (binary operator ge).
eq() Get equal to of dataframe and argument, element-wise (binary operator eq).
ne() Get Not equal to of dataframe and argument, element-wise (binary operator ne).

Computation Functions

FunctionDescription
count() Returns the count of non-NA cells for each column or row.

Descriptive statistics Functions

FunctionDescription
sum() Returns the sum of the values over the specified axis.
max() Returns the maximum of the values over the specified axis.
min() Returns the minimum of the values over the specified axis.
mean() Returns the mean of the values over the specified axis.
median() Returns the median of the values over the specified axis.
mode() Returns the mode(s) of each element over the specified axis.
std() Returns the sample standard deviation over the specified axis.
var() Returns unbiased variance over the specified axis.
skew() Returns unbiased skew over the specified axis.
kurt() Returns unbiased kurtosis over the specified axis.
kurtosis() Returns unbiased kurtosis over the specified axis.

Indexing/Iteration Functions

FunctionDescription
head() Returns the first specified number of rows.
pop() Returns item and drop from frame.
tail() Returns the last specified number of rows.

Function application, GroupBy & window Functions

FunctionDescription
agg() Aggregate using one or more operations over the specified axis.
aggregate() Aggregate using one or more operations over the specified axis.