In this post, we will learn how to use Numpy’s corrcoef() function to compute correlation between two datasets stored in a list or arrays. Numpy’s corrcoef function calculates pearson correlation coefficient, which is a measure of how two variables are related. The resulting correlation coefficient can range from 1 to -1. A correlation coefficient of […]
Python Tips
Numpy arange() function with examples
In this post, we will learn how to use arange(), one of the most useful functions in Numpy. With Numpy arange function we can create evenly spaced arrays. For example, If you need to create an array of numbers within a given range, you can use the arange function. To get started let us load […]
Numpy isclose() function with examples
In this post, we will learn about Numpy’s isclose() function to determine if two numbers or two arrays are close to each other allowing for tolerance to call if they are close. Numpy’s np.close() function is extremely useful when comparing floating-point numbers. We know that floating-point numbers are not represented accurately in computer memory. And […]
Difference between Pandas where() function and mask() function
Pandas mask() and where() functions are two related functions that are useful in Pandas to find if elements of Pandas dataframe satisfy a condition. They both preserve the shape of the dataframe. In this post, we will first see simple examples of using Pandas where() and mask() functions and then we will learn the key […]
Seaborn version 0.12.0 with ggplot2-like interface
It is just over a month since Seaborn version 0.12.0 is here with a huge update on the way we can make plots using Seaborn. Finally got a chance to test it out. Seaborn version 0.12.0 introduces seaborn.objects interface, inspired by Wilkinson’s grammar of graphics, offers “Pythonic API that is informed by the design of […]