Top 10 Python Libraries for E-commerce

In this article, we explore 10 Python libraries, platforms, tools, and frameworks that are useful for e-commerce. Criteria for the list included their relevance to e-commerce, popularity, the level of maintenance that is given to the code base, and their usefulness. We searched far and wide and narrowed down our search to the following: Saleor … Read more

How to Install NumPy on PyCharm?

Problem Formulation: Given a PyCharm project. How to install the NumPy library in your project within a virtual environment or globally? Solution that always works: Open File > Settings > Project from the PyCharm menu. Select your current project. Click the Python Interpreter tab within your project tab. Click the small + symbol to add … Read more

How to Print a NumPy Array Without Brackets in Python?

Note that this tutorial concerns NumPy arrays. To learn how to print lists without brackets check out this tutorial: How to Print a List Without Brackets in Python? Problem Formulation Given a NumPy array of elements. If you print the array to the shell using print(np.array([1, 2, 3])), the output is enclosed in square brackets … Read more

People Who Bought X Also Bought …? An Introduction to NumPy Association Analysis

Imagine you are Jeff Bezos. One of the most successful features of your company Amazon is product recommendation. “People who bought X also bought Y.” Roughly speaking, this feature alone has made you billions. For you, Jeff Bezos, product recommendation is the most important algorithm in the world, isn’t it? In this article, you’ll learn … Read more

NumPy all() – A Simple Guide with Video

Syntax numpy.all(a, axis=None, out=None, keepdims=<no value>, *, where=<no value>) Argument Type Description a array_like Input array axis None, int, or tuple of int Optional. One axis or multiple axes along which logical AND should be performed. Per default, it computes logical AND on the flat array. If this is a tuple of integers, calculates logical … Read more

How to Print a NumPy Array Without Truncating It?

Problem Formulation In some shell environments, when printing a large NumPy array, the Python interpreter automatically displays only a small, truncated portion of the array, using the triple dots ‘…’ to indicate that some values are missing in the textual representation of the array. Here’s an example of a truncated array: Here’s how that looks … Read more

How to Find Outliers in NumPy Easily?

Can you spot the outliers in the following sequence: 000000001000000001? Detecting outliers fast can be mission critical for many applications in military, air transport, and energy production. This article shows you the most basic outlier detection algorithm: if an observed value deviates from the mean by more than the standard deviation, it is considered an … Read more

NumPy Sort [Ultimate Guide]

The np.sort(array) function returns a sorted copy of the specified NumPy array. Per default, it sorts the values in ascending order, so np.sort([42, 2, 21]) returns the NumPy array [2 21 42]. Here’s an example of 1D sorting: And here’s an example of 2D sorting — each axis is sorted separately. An example of 3D … Read more

How to Use Slice Assignment in NumPy?

NumPy slice assignment allows you to use slicing on the left-hand side of an assignment operation to overwrite a specific subsequence of a NumPy array at once. The right side of the slice assignment operation provides the exact number of elements to replace the selected slice. For example, a[::2] = […] would overwrite every other … Read more

NumPy Boolean Indexing

You can index specific values from a NumPy array using another NumPy array of Boolean values on one axis to specify the indices you want to access. For example, to access the second and third values of array a = np.array([4, 6, 8]), you can use the expression a[np.array([False, True, True])] using the Boolean array … Read more

What’s the Best NumPy Book?

Fear of missing out in data science? Data science and machine learning are taking over. Data-driven decision making penetrates every single company nowadays. Data science is indeed the “sexiest job in the 21st century“! There is one Python library which is the basis of any data science related computation you can undertake as a Python … Read more