Category: Data Structure

  • Pandas sort by column name

    Pandas sort by column name is nothing but a certain type of data analysis. For beginners especially, we can do it to give an idea. Think about the data structure as a spreadsheet where we have multiple rows and columns. Right? Now we can use Pandas to handle a large amount of data because this…

  • Pandas describe method

    In the previous section we have learned how we can play with pandas head and tail methods. Pandas describe method is also important. Why? Because pandas describe method generates descriptive statistics that we need especially for studying statistical data.  Before moving ahead, let’s take a look at the code first. Now as we take a…

  • Pandas head and tail

    For beginners in data science and machine learning, Pandas head and tail functions are two most basic tools that we use. We have already discussed a few Pandas topics before. If you have not already had an idea about how Pandas Python library works, you may check the following links. Firstly, Pandas library in Python…

  • What is type annotation in Python?

    To state type annotation simply, we can say it indicates the data type of a variable firstly. Secondly input, output of a function. Now in many programming languages, we explicitly mention the data type. We call them Strongly typed, or Statically typed languages. On the other hand, in Python it is not mandatory at all.…

  • Python data structures and TensorFlow

    In our previous section we have seen how we can work with python data structures. Now we will do the same with TensorFlow. Before we start let’s recapitulate. TensorFlow is a machine learning library. As a result, when we import the TensorFlow as “tf”, it acts as a TensorFlow object. In the previous section we…

  • Pandas DataFrame update column row

    How do we update Pandas DataFrame column value? Moreover, can we apply logic on these changes that take place? Well, as a beginner, we face such questions and we try to find simple solutions. For that reason, in this section, we will discuss this topic. In addition we will also try to move forward and…

  • How to filter Pandas DataFrame

    We have already seen how versatile the Pandas package is. In this section we’ll find how we can filter Pandas DataFrame.  We have been working with the Pandas GitHub repository of data. The DataFrame is simple. Let’s see the code. There are altogether 244 rows and 7 columns.  By the way, we refer to rows…

  • Pandas DataFrame operations introduction

    In this section we will have an introduction to the Pandas package and DataFrame operations. We’ve learned what the Pandas package means. In addition, we have seen how DataFrame works. As a Data Science beginner we need data analysis. And to learn that we need the Pandas package and we must have a clear vision…

  • Pandas DataFrame and Python Dictionary

    Pandas is a Python package. It provides fast and flexible data structures. However, is there any similarity between DataFrame and Python? In this section we will try to answer this question. To do that, we need to know how the Pandas package works. Firstly, the Pandas data structures can work with either “relational” or “labelled”…

  • How to install Jupyter notebook and work locally

    In this section we will learn how to install Jupyter notebook and work locally. We can say it’s a local version of Google Colab.  Or you may think just the opposite while working in Google Colab. Firstly, for Linux Debian like Ubuntu, or for Mac, the installation mechanism is the same. However, for Windows we…

  • Pandas reading writing Tabular Data

    In this section we will see how reading and writing tabular data gets easier with the Pandas package in Python.   In the last section, we have seen how we can read tabular data in Pandas. Besides reading, writing tabular data in Pandas is also easy. Let’s see how we cam do that. Let’s first read…

  • An Introduction to Pandas Package in Python

    Why do we need the Pandas package in Python? That’s the first question we need to answer. There are several reasons though. However, the main reason is, of course, Pandas can deal with data structures better than many other python packages. As a result, if we want to read, change, modify or manipulate data structures, Pandas…

  • Can we skew Median in Data Science

    In our previous section we have seen that we can trust Median than Mean. But in reality we can skew the Median. And we can make the Median look much greater than it should be.  In data science, as well as in statistics, we can prove that. We can skew the Median and maximise its…

  • Why Median is better than Mean in Data Science

    Why is Median better than Mean in Data Science? This question haunts beginners in particular. We will discuss this topic in this section. Although an experienced data scientist knows the answer. But, still we can question this conviction also.  Why? We’ll check in the next section. Therefore, I will request you to check the next…

  • Data Structures and Data Science Tools

    How can we analyse data structures with the help of the data science tools? Let’s take a look and try to understand a core concept of Mathematics, Data Science and above all Data Structures. In different programming languages the core concepts that revolve around data structures are the same. Since syntax or the grammar of…

  • Matrix product in NumPy, Simplified and Explained

    What is the Matrix in NumPy? The Matrix refers to a specialised two dimensional array which we’re trying to simplify and explain. Firstly, let’s take an example of a two dimensional array.  In the above code there are two separate arrays. However we have placed it in between an array. Therefore, we can access any…

  • NumPy array operations

    We can always slice python lists elements. However, the NumPy array gives us more freedom for operations. Let’s see how it works. Firstly, we’ll take a look at a simple python list which consists of a few arbitrary numbers. Secondly, if we take a close look at the above list, we can say two things…

  • NumPy array sort in Python

    We can sort any array with the NumPy array sort method. Certainly, it’s faster and easier than writing the sorting algorithm in Python. We’ll see to that in a minute. But before that, we need to recapitulate one key concept in Python and algorithm. Every algorithm comes with a cost. That means, we can write…

  • What are Axes and Attributes in NumPy

    To understand NumPy arrays we need to understand axes and attributes first. These two terms play an important role in NumPy.  Why? Because NumPy arrays represent a data structure. However, to understand this concept we need to define two terms that we will often use in NumPy. They are axes and attributes. For example, let’s…

  • NumPy for Absolute Beginners

    NumPy or Numerical Python is an open source Python library. We use NumPy almost on a regular basis in Data Science. This section on NumPy is for absolute beginners. However, we assume that you have a basic knowledge of the Python programming language. If that is not the case, please check our Python category first.…

  • NumPy, Matplotlib, Image and Data Science

    Firstly, Data science always relates to data structure and data manipulation. Secondly, the python packages like NumPy or Matplotlib also relate data structure.  However, a data science beginner might not know that. Image is also a representation of data structure. Any image is nothing but an array of floating points. Those numbers represent the amount…