#### Overview of this book

The pandas library is massive, and it's common for frequent users to be unaware of many of its more impressive features. The official pandas documentation, while thorough, does not contain many useful examples of how to piece together multiple commands as one would do during an actual analysis. This book guides you, as if you were looking over the shoulder of an expert, through situations that you are highly likely to encounter. This new updated and revised edition provides you with unique, idiomatic, and fun recipes for both fundamental and advanced data manipulation tasks with pandas. Some recipes focus on achieving a deeper understanding of basic principles, or comparing and contrasting two similar operations. Other recipes will dive deep into a particular dataset, uncovering new and unexpected insights along the way. Many advanced recipes combine several different features across the pandas library to generate results.
Preface
Pandas Foundations
Free Chapter
Essential DataFrame Operations
Creating and Persisting DataFrames
Exploratory Data Analysis
Selecting Subsets of Data
Combining Pandas Objects
Visualization with Matplotlib, Pandas, and Seaborn
Debugging and Testing Pandas
Other Books You May Enjoy
Index

# Comparing two continuous columns

Evaluating how two continuous columns relate to one another is the essence of regression. But it goes beyond that. If you have two columns with a high correlation to one another, often, you may drop one of them as a redundant column. In this section, we will look at EDA for pairs of continuous columns.

## How to do it…

1. Look at the covariance of the two numbers if they are on the same scale:
``````>>> fueleco.city08.cov(fueleco.highway08)
46.33326023673625
>>> fueleco.city08.cov(fueleco.comb08)
47.41994667819079
>>> fueleco.city08.cov(fueleco.cylinders)
-5.931560263764761
``````
2. Look at the Pearson correlation between the two numbers:
``````>>> fueleco.city08.corr(fueleco.highway08)
0.932494506228495
>>> fueleco.city08.corr(fueleco.cylinders)
-0.701654842382788
``````
3. Visualize the correlations in a heatmap:
``````>>> import seaborn as sns
>>> fig,...``````