How to Calculate the Column Standard Deviation of a DataFrame in Python Pandas?

Want to calculate the standard deviation of a column in your Pandas DataFrame? In case you’ve attended your last statistics course a few years ago, let’s quickly recap the definition of variance: it’s the average squared deviation of the list elements from the average value. You can do this by using the pd.std() function that … Read more

Why does Python Look Great on Your Resume?

Nothing to add—let’s get started! ? Python is the fastest-growing major programming language. A StackOverflow 2019 developer survey shows that Python is not only faster growing than C++, Java, JavaScript, and any other major programming language, it also comes with a happier community that loves the language most. Python is great for machine learning. Python comes with … Read more

Why Should I Use NumPy?

NumPy is not the trendiest Python library in the world. There are libraries such as TensorFlow or Scikit-learn for machine learning. These libraries get all the attention these days. However, in this article, I want to highlight the importance of learning the basics first. You cannot learn TensorFlow before you’ve learned Python. Similarly, you cannot … Read more

Python Numpy 101: How to Calculate the Row Variance of a Numpy 2D Array?

You can play with the following interactive Python code to calculate the variance of a 2D array (total, row, and column variance). Here’s another practical example: What is the output of this puzzle?*Advanced Level* (solution below) Numpy is a popular Python library for data science focusing on arrays, vectors, and matrices. This puzzle introduces a … Read more

How do You Slice and Index Multidimensional Arrays in Numpy?

Python’s library for data science, NumPy, allows you to slice multidimensional arrays easily. For multi-dimensional slices, you can use one-dimensional slicing for each axis separately. You define the slices for each axis, separated by a comma. Here are a few examples drawn from my comprehensive NumPy tutorial. Take your time to thoroughly understand each of … Read more