Arulius Savio

Arulius Savio

Pandas qcut: An Explanation with Examples

Pandas qcut: An Explanation with Examples

Splitting a set of numbers, such as test scores, into groups like quartiles lets you compare values by where they rank. pandas qcut does this by rank, putting a similar number of values in each group. This guide shows how…

How to Use Numpy Maximum on Arrays?

How to Use Numpy Maximum on Arrays?

At the second position, np.maximum returns 9 from the pair 8 and 9. That position-by-position result catches my attention: each comparison stays tied to its matching pair instead of reducing the whole array to one maximum. For your two arrays,…

Mastering NumPy’s Powerful einsum_path( ) Function

Mastering NumPy’s Powerful einsum_path( ) Function

Einsum is an almighty function from the numpy library which is the most efficient manipulator of n-dimensional arrays. It can perform umpteen functions such as adding, multiplying or rearranging the input arrays in a jiffy, resulting in multiple x’s faster…