From the course: Advanced Pandas

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Correlations and statistical functions

Correlations and statistical functions

From the course: Advanced Pandas

Start my 1-month free trial

Correlations and statistical functions

- [Instructor] Long before machine learning and AI became the buzzwords of the century, the humble discipline of statistics established the foundation for drawing inference and insight from our data. With pandas, you have several statistical functions right at your fingertips. Before we explore the statistics capabilities of pandas, let's import the iris dataset. First, let's explore some of the built-in measures for central tendency. By simply calling .mean on our data frame, pandas computes the average for each of our numeric variables. We can similarly return the median values with .median. Now, if we want to return the most frequent observations for each of our variables, we can utilize the mode function. This output takes a moment to interpret. Knowing that a data set can have multiple modes per variable in the case of a tie, we see that our output returns the mode at index zero, but in the case of a tie, it…

Contents