🚀 LEVEL UP TO SENIOR:Unlock 500+ Advanced Practical Challenges & Exercises.
🎓 COURSERA PARTNER:Earn professional Google, Meta, and IBM certificates to supercharge your resume.

Project 17: Clicks vs. Time Correlation

Data Analyst

Builds on these lessons

Current Task

Objective

.corr() computes the pairwise correlation between every numeric column pair, from -1 (inverse) to 1 (direct relationship).

Task: create a DataFrame of clicks and time_on_page, then print its correlation matrix.

index.py
import pandas as pd data = pd.DataFrame({'clicks': [10, 20, 30, 40], 'time_on_page': [5, 12, 18, 25]}) print(data.corr())

* Hint: Correct characters turn green, incorrect ones turn red.

Live Preview
🖼️

Verify your code to see the preview