New course! Every coder should learn Generative AI!
Try a free lesson+ 1
There is actually a function for this in scipy library.
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html
You just have to separate your dataset in two lists.. Something like this.
https://code.sololearn.com/c5JtTLotrz3Z/?ref=app