<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Maiyo</title>
    <description>The latest articles on Forem by Maiyo (@maiyo008).</description>
    <link>https://forem.com/maiyo008</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1028262%2Fcef19de5-a6ad-47f5-b079-10d55758eef7.jpeg</url>
      <title>Forem: Maiyo</title>
      <link>https://forem.com/maiyo008</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/maiyo008"/>
    <language>en</language>
    <item>
      <title>Python 101 For Data Engineering</title>
      <dc:creator>Maiyo</dc:creator>
      <pubDate>Fri, 25 Apr 2025 09:53:28 +0000</pubDate>
      <link>https://forem.com/maiyo008/python-101-for-data-engineering-5ba2</link>
      <guid>https://forem.com/maiyo008/python-101-for-data-engineering-5ba2</guid>
      <description>&lt;h2&gt;
  
  
  What is python
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Python&lt;/strong&gt; is a popular high level programming language. Programming languages are set of instructions written for computers to perform specific tasks. We have different kinds of programming languages like C, C++, Rust, Java, C# and of course python. Most languages are categorized as &lt;em&gt;low-level&lt;/em&gt;, &lt;em&gt;mid-level&lt;/em&gt; or &lt;em&gt;high-level&lt;/em&gt; languages. Python is a high level programming language because it is more human readable and abstracts away many hardware details. On the other end, low-level languages are more closer to being easily understood by computers (or hardware) than humans. &lt;/p&gt;

&lt;p&gt;Python is general purpose and is used for web development, system administration, scientific and numerical analysis and GUI development. The cross-field application and ease of learning has made python one of the popular languages.&lt;/p&gt;

&lt;h2&gt;
  
  
  Getting started with python
&lt;/h2&gt;

&lt;p&gt;We are now getting closer to starting to write python code. But, before that, we need to set up our computers’ environments to write and run python. When we write code, we need an &lt;a href="https://en.wikipedia.org/wiki/Interpreter_(computing)#:~:text=In%20computer%20science%2C%20an%20interpreter,into%20a%20machine%20language%20program." rel="noopener noreferrer"&gt;interpreter&lt;/a&gt; to read and execute code.&lt;br&gt;
On that note, we shall begin with installation of the latest python version to our PCs. It is important to note that this installation depends on which Operating System your computer is using. Mostly, Linux distributions and mac OS comes with python pre-installed. As for windows, we can install python from the &lt;a href="https://www.python.org/downloads/windows/" rel="noopener noreferrer"&gt;link&lt;/a&gt; and follow instructions on the Python installer for installation. I will be focusing on Linux, since my computer runs on Ubuntu. &lt;/p&gt;

&lt;p&gt;We already know that python comes pre installed in linux distributtions, but it is important to know the version that is installed. Python has several versions, and the latest is version 3.x.x. Installing the right version is important because Python 3.x.x is not backward compatible, hence you can experience challenges while coding in python. &lt;/p&gt;

&lt;h2&gt;
  
  
  Checking Python version.
&lt;/h2&gt;

&lt;p&gt;To check python version, we run the command &lt;code&gt;python -V&lt;/code&gt; or &lt;code&gt;python --version&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkaon0fvwarjlzpxbedr0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkaon0fvwarjlzpxbedr0.png" alt="Image description" width="800" height="116"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After installing the right version, we need a code editor to use in writing code. Some editors come pre-installed like Notepad, Vim which is fine. &lt;br&gt;
In my opinion, using editors like Vim to write code as a beginner, you get to learn a lot on the actual syntax of python, and also learn to work from the &lt;a href="https://en.wikipedia.org/wiki/Command-line_interface" rel="noopener noreferrer"&gt;Command Line Interface&lt;/a&gt;. Vim can have a steep learning curve on basic editor functionalities, and on that note we can use different editors of our preferences.&lt;br&gt;
To write python, one can use VSCode, Pycharm or Sublime IDEs. To install them, you can use the links below, and remember to get the right software for your Operating System.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/download" rel="noopener noreferrer"&gt;VsCode&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.jetbrains.com/pycharm/?source=google&amp;amp;medium=cpc&amp;amp;campaign=EMEA_en_AFRICA_PyCharm_Branded&amp;amp;term=pycharm&amp;amp;content=698987581416&amp;amp;gad_source=1&amp;amp;gbraid=0AAAAADloJzgW4gcWabJClrElNPwR7mXmP&amp;amp;gclid=Cj0KCQjw5azABhD1ARIsAA0WFUFAhwBNJOrXJzAD5uOQJc6bh3S3S5YHD92vzpUWmC0Luwn6ZPfvkfwaAjqXEALw_wcB" rel="noopener noreferrer"&gt;Pycharm&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.sublimetext.com/download" rel="noopener noreferrer"&gt;Sublime&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We now everything set to start coding in python. As anyone starts learning,&lt;a href="https://docs.python.org/3/" rel="noopener noreferrer"&gt;python documentation&lt;/a&gt; is really important and contains everything needed to learn python. On top of it, there are various websites that teach well. Python for Data engineering, Here We Go.&lt;/p&gt;

&lt;h2&gt;
  
  
  Python basics
&lt;/h2&gt;

&lt;p&gt;As for any programming language, we can start by writing ‘Hello World’ program. This is important because it enables us to learn how we run python programs.&lt;/p&gt;

&lt;h4&gt;
  
  
  Writing Python on IDEs
&lt;/h4&gt;

&lt;p&gt;When using IDEs (Integrated Development Environments), it is easy to run a python program. All you need is to select the file you want to run and click the play button and the program executes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52p2u4qxqa4ehq9qeyao.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F52p2u4qxqa4ehq9qeyao.png" alt="Image description" width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Writing Python using the terminal
&lt;/h4&gt;

&lt;p&gt;Learning and mastering how to use the terminal is important. Mostly when interacting with virtual machines on cloud, basically one works on a command line interface (CLI)&lt;br&gt;
&lt;strong&gt;Step 1:&lt;/strong&gt; Writing the script on the terminal, and create a &lt;code&gt;.py&lt;/code&gt; file. For the tutorial we are using &lt;em&gt;vim editor&lt;/em&gt;. Before, navigate to a folder you want using &lt;code&gt;cd&lt;/code&gt;, then run &lt;code&gt;Vim hello.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvl0y3ptocbux2sxehx80.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvl0y3ptocbux2sxehx80.png" alt="Image description" width="800" height="173"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To save the file, press &lt;code&gt;ESC&lt;/code&gt;, then type &lt;code&gt;:wq&lt;/code&gt; and hit &lt;code&gt;enter&lt;/code&gt;. Run &lt;code&gt;ls&lt;/code&gt; command on the directory to list all files on the directory.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8a25dond8pocq1uvg56f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8a25dond8pocq1uvg56f.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Step2:&lt;/strong&gt; Once the file is already saved, run the script using either: &lt;code&gt;python hello.py&lt;/code&gt; or &lt;code&gt;python3 hello.py&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8kpedrvihrkfa50wq6lj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8kpedrvihrkfa50wq6lj.png" alt="Image description" width="800" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As observed, we are using the command &lt;code&gt;python&lt;/code&gt; (or &lt;code&gt;python3&lt;/code&gt;) + &lt;code&gt;file name&lt;/code&gt; to run the script. Before we all get confused, the two commands are similar but subjective to the python version installed. Python command traditionally points to python 2.x.x while python3 explicitly points to python 3.x.x which is the most recent and mantained version on python.&lt;/p&gt;

&lt;p&gt;Another method to run python on the command shell is to make it an executable. This is achieved by adding a shebang on top of the script. Note that this is only for unix-like systems eg. Ubuntu&lt;/p&gt;

&lt;h5&gt;
  
  
  A shebang
&lt;/h5&gt;

&lt;p&gt;A shebang is the first line in a script that instructs an operating system to execute a file. Basically a shebang enables us to run a script directly like &lt;code&gt;./hello.py&lt;/code&gt; unlike using &lt;code&gt;python3&lt;/code&gt; command.&lt;/p&gt;

&lt;p&gt;Shebang syntax:&lt;br&gt;
&lt;code&gt;#!/usr/bin/python3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdqnp0l3e4q4pd3ng7d3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgdqnp0l3e4q4pd3ng7d3.png" alt="Image description" width="800" height="407"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Step 1: Add shebang on the first line of the script. Save and quit vim&lt;/li&gt;
&lt;li&gt;Step 2: Make the python script executable. Run the command &lt;code&gt;chmod u+x hello.py&lt;/code&gt;. The command gives the user(you) execute permissions on the file hello.py&lt;/li&gt;
&lt;li&gt;Step 3: Run the file directly. &lt;code&gt;./hello.py&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftylkdxswbn0s0k3sdle1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftylkdxswbn0s0k3sdle1.png" alt="Image description" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In conclusion on these two methods of running python scripts, both of them are interchangeably. Any can be used, but I would prefer shebangs on production scripts especially used for automation. As for &lt;code&gt;python3&lt;/code&gt; command, it is easy and flexible to use(especially when switching between versions) when learning and development.&lt;/p&gt;

</description>
      <category>dataengineering</category>
      <category>python</category>
      <category>ubuntu</category>
      <category>cmd</category>
    </item>
    <item>
      <title>Popping the Web Stack</title>
      <dc:creator>Maiyo</dc:creator>
      <pubDate>Sun, 16 Apr 2023 06:58:53 +0000</pubDate>
      <link>https://forem.com/maiyo008/popping-the-web-stack-5g79</link>
      <guid>https://forem.com/maiyo008/popping-the-web-stack-5g79</guid>
      <description>&lt;p&gt;Humans are a species that continuously evolve. A while ago, the sole source of written information was the libraries. And by libraries I mean those huge buildings stacked with long shelves filled with books. To access any piece of information, you had to visit the library in person, look for your resource in a catalog, identify the right location of the resource from the many shelves and finally begin to look for information from your resource. Do not get it twisted, I am a fan of libraries. My point is this very process that I have mentioned necessitated one of the most brilliant inventions of humans, The internet.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Internet
&lt;/h3&gt;

&lt;p&gt;The internet is a global network of interconnected devices around the world that work hand in hand to share information. These devices majorly include computers as the majority together with servers, routers, and switches which are majorly network devices. In other words, the internet is a community of computers. &lt;br&gt;
One lovely thing about the Internet is that it is not owned by a single entity, making it free for anyone with an Internet connection. Isn't lovely? Nonetheless, every community has to have rules on how everyone engages and this is reflected on the internet too. The Internet is decentralized among a network of organizations including Internet service providers (ISPs), content creators, governments, and several agency bodies. All these organizations are tasked with regulations and making the internet safe.&lt;/p&gt;

&lt;h3&gt;
  
  
  The web
&lt;/h3&gt;

&lt;p&gt;A lot of people think that the web and the internet are the same, but they are not. The web (or World Wide Web) is a subset of the internet that consists of globalized webpages, images, and videos that can be accessed from a web browser.&lt;br&gt;
Then what is the difference between the two? The internet is the infrastructure upon which computers share information, while the web is an application or service that uses the internet to make hypertext documents accessible.&lt;/p&gt;

&lt;h4&gt;
  
  
  How does the web work?
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--zSmk3LPq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Client-server-model.svg/375px-Client-server-model.svg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--zSmk3LPq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://upload.wikimedia.org/wikipedia/commons/thumb/c/c9/Client-server-model.svg/375px-Client-server-model.svg.png" alt="Client server model" width="375" height="225"&gt;&lt;/a&gt;&lt;br&gt;
The web works on a &lt;strong&gt;client-server model&lt;/strong&gt;. This model differentiates the tasks between the client and the server. In this case, the &lt;strong&gt;server&lt;/strong&gt; is the service or resource provider, while the &lt;strong&gt;client&lt;/strong&gt; is the service or resource requestor.&lt;br&gt;
This model is widely used because the data is centralized making it easy to maintain. Also, the capacities of the clients and servers are independent which brings flexibility to the model. Remember this makes it possible for you to access the internet using any device like a phone, tablet, or laptop which vary in terms of specifications.&lt;br&gt;
This model forms the architecture which is the basis of our question, what happens when you type &lt;code&gt;https://www.google.com&lt;/code&gt; in your browser and press Enter? It is the foundation of how the web works.&lt;/p&gt;

&lt;h3&gt;
  
  
  What happens when you type &lt;code&gt;https://www.google.com&lt;/code&gt; in your browser and press &lt;code&gt;Enter?&lt;/code&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vYY6jxVc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ifpledzd6oxt7nabmlne.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vYY6jxVc--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ifpledzd6oxt7nabmlne.png" alt="What happens when you type in a URL" width="800" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  1. Type &lt;code&gt;https://www.google.com&lt;/code&gt; on your web browser's address bar
&lt;/h4&gt;

&lt;p&gt;Remember that the main application you can access the internet with from your device is the web browser. A web browser is just a software application that runs on your operating system, that is used to access, view and interact with websites. There are numerous web browsers which include google chrome, Mozilla Firefox, Apple's Safari, and Microsoft Edge. Of course, we had internet explorer back in time which ceased to exist.&lt;/p&gt;

&lt;h5&gt;
  
  
  The URL
&lt;/h5&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jiBawgzn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xj3lhf1m8r5puhggiwc1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jiBawgzn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xj3lhf1m8r5puhggiwc1.png" alt="URL diagram" width="500" height="300"&gt;&lt;/a&gt;&lt;br&gt;
What is keyed into the browser's address bar is known as the &lt;strong&gt;uniform resource locator (URL)&lt;/strong&gt;. We now understand that the internet is regulated and standardized, hence the use of URLs. A URL is a standardized way of specifying the location of a resource on the internet. It has the following format&lt;br&gt;
&lt;code&gt;protocol://host/path?query&lt;/code&gt;&lt;br&gt;
The URL &lt;code&gt;https://www.google.com&lt;/code&gt; does not include the path and query section of a standard URL, but here is its breakdown:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Protocol - Specifies the communication protocol to be used to access the resource. It can be HTTP, HTTPS, FTP among other protocols. The protocol for this URL is HTTPS.&lt;/li&gt;
&lt;li&gt;Host - Specifies the domain name for the website. A domain name can be further split into the sub-domain, domain, and top-level domain:&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;www: This is the subdomain of the domain name google.com. The www subdomain is a common convention for web pages, but it is not strictly necessary for accessing the site.&lt;/li&gt;
&lt;li&gt;Google: This is the primary domain name of the site, which identifies the organization or entity that owns it.&lt;/li&gt;
&lt;li&gt;.com: This is the top-level domain (TLD) of the site, which indicates the type of organization or domain category. In this case, it is a commercial organization, as indicated by the "com" TLD.
The rest of the sections of the URL can be described as:&lt;/li&gt;
&lt;/ol&gt;

&lt;ul&gt;
&lt;li&gt;Path - Specifies the location of the resource&lt;/li&gt;
&lt;li&gt;Query - Specifies additional parameters used to specify the resource being searched.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2. DNS lookup
&lt;/h3&gt;

&lt;p&gt;Computers only understand bits, that is 1s and 0s. Due to this reason, URLs need to be translated to the appropriate IP addresses of the respective host. This is done by DNS servers.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is DNS?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Domain name system&lt;/strong&gt; is the protocol that translates readable URLs into IP addresses. It is commonly referred to as the &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;phonebook&lt;br&gt;
 of the internet. Humans are poor at remembering numbers. This is why you have a phonebook that keeps names against cell numbers in your phone.&lt;br&gt;
DNS is capable of doing IP mapping since it keeps records of hosts' domain names and respective IP addresses. These records include A, CNAME, MX, NS,  SOA, and TXT records.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;An (Address) - Used to point a domain name to the associated IP address.&lt;/li&gt;
&lt;li&gt;CNAME (Canonical Name) - Used for creating aliases of domain names.&lt;/li&gt;
&lt;li&gt;MX (Mail Exchanger) - Used to deliver email to a specified address.&lt;/li&gt;
&lt;li&gt;NS (Name Server) - Used to specify an authoritative name server for a given host.&lt;/li&gt;
&lt;li&gt;SOA (Start of Authority) - Used to determine key information about a DNS zone.&lt;/li&gt;
&lt;li&gt;TXT - Used to verify domain ownership and hold SPF (Sender Policy Framework) data.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  What is an IP address?
&lt;/h4&gt;

&lt;p&gt;Remember that computers only understand bits. An IP address consists of a series of numbers separated by dots or colons. It is a unique identifier assigned to every computer in a network. There are two versions of IP addresses, IPv4 and IPv6. IPv4 is 32 bits long with the digits separated by dots, while IPv6 is 128 bits long with colons as the separators.&lt;/p&gt;

&lt;h4&gt;
  
  
  How is the IP address resolved (DNS lookup)
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--boXyex7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lm8727tgm26s9xded9bu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--boXyex7w--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lm8727tgm26s9xded9bu.png" alt="DNS lookup for google" width="800" height="416"&gt;&lt;/a&gt;&lt;br&gt;
To resolve or get an IP address for google.com, a forward DNS lookup is done. DNS data is heavily cached, therefore, DNS lookup is first done locally. Let's say you've entered the URL using the Chrome browser, and a recursive query is done. The browser, which in this case is the DNS client, looks up the address from its browser cache, if it does not resolve it, it looks up in the operating system cache.&lt;br&gt;
If the address is not resolved from the local DNS server, the local DNS server queries other DNS servers until a name resolution is found.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. TCP connection
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ONyKnnFF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/euy8q3k7l37e6luqiqws.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ONyKnnFF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/euy8q3k7l37e6luqiqws.png" alt="TCP three-way handshake" width="492" height="221"&gt;&lt;/a&gt;&lt;br&gt;
Once the server's IP address is resolved, the browser initiates a TCP connection. &lt;strong&gt;The Transmission Control Protocol&lt;/strong&gt; (TCP) is a transport layer protocol according to the OSI model which is responsible for how network devices exchange data. Data is transmitted over the internet as packets. TCP is a reliable protocol, meaning any data packets lost or duplicated in transit are detected and corrected. TCP works on top of &lt;strong&gt;Internet Protocol (IP)&lt;/strong&gt; that is responsible for routing data packets to the right location address.&lt;br&gt;
TCP connection is established through a three-way handshake.&lt;br&gt;
First, the client browser sends a SYN packet or segment to the server.&lt;br&gt;
If the server has received the segment, it agrees to the connection by sending the SYN-ACK packet back to the client.&lt;br&gt;
The client acknowledges the receipt of the SYN-ACK packet by sending its own ACK packet. At the same time, the client can already begin transmitting data packets to the server.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. HTTP Request.
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fKHSfGQ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6mv5ceq5tiilztxtdsz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fKHSfGQ3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/e6mv5ceq5tiilztxtdsz.png" alt="http vs https" width="550" height="358"&gt;&lt;/a&gt;&lt;br&gt;
When we request a resource from Google, the client browser sends an HTTP request to the web server. HTTP stands for the &lt;strong&gt;Hypertext Transfer Protocol&lt;/strong&gt;. It is used to request resources from the web.&lt;br&gt;
HTTP requests sent to the web server are a combination of the following:&lt;br&gt;
Request methods - This indicates the HTTP method used to fetch the resources. There are several methods like GET, HEAD, POST, PUT, DELETE,  CONNECT, OPTIONS, and TRACE. GET is used to retrieve data from the web server.&lt;br&gt;
Request URL - This is the URL of the resource requested. Remember URLs carry the path to the resource requested.&lt;br&gt;
Request headers - This is the additional information such as the user-agent, which is the browser sending the HTTP requests.&lt;br&gt;
Request body - This is optional in an HTTP request and is used for methods that send data to the web server like forms data.&lt;/p&gt;

&lt;h4&gt;
  
  
  HTTP with 's' (HTTPS)
&lt;/h4&gt;

&lt;p&gt;HTTPS stands for &lt;strong&gt;Hypertext Transfer Protocol Secure&lt;/strong&gt;. Up to this stage, we have explored HTTP requests that do not have a security mechanism within them. Dynamic websites are interactive and more than often it requires users or clients to send data in forms for services such as authentication. Let's say you want to log in to your favorite blog post, you have to key in your password. When HTTP protocol is used there is vulnerability to your data in this case password and username to anyone sniffing over your connection.&lt;br&gt;
This has led to the use of a more secure protocol HTTPS. This protocol encrypts data as it is being exchanged between the client and the web server, therefore, providing secure communication. It achieves this by the use of &lt;strong&gt;SSL (Secure Sockets Layer)&lt;/strong&gt; or &lt;strong&gt;TLS (Transport Layer Security)&lt;/strong&gt; protocols. SSL/TLS uses public-key cryptography for its encryption. Public-key cryptography relies on two keys: a &lt;strong&gt;public key&lt;/strong&gt; and a &lt;strong&gt;private key&lt;/strong&gt;.&lt;br&gt;
When a client connects to an HTTPS website, the website provides a public key to the client. &lt;em&gt;This public key is also normally referred to as SSL or TSL certificate depending on the protocol in use&lt;/em&gt;. The client uses this public key to encrypt a symmetric encryption key and send it over to the web server. After the server receives it, it uses its private key to decrypt the symmetric encryption key. Once both the browser and the web server have the symmetric encryption key, they use it to encrypt data as they are transmitted. When the transmission is done, the symmetric encryption key is discarded.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Processing the requests and serving a response
&lt;/h3&gt;

&lt;p&gt;Processing of HTTP requests is done by a web server. A web server is a software that runs on a physical server that serves web pages. It hosts website files that include HTML documents, CSS stylesheets, JavaScript files, images, and videos. Normally the web stack includes a database, which can be running on the same physical server as the web server or on a different server. The database is used to store user information for dynamic websites.&lt;br&gt;
To fully process a request, the web server undergoes this series of steps before sending back a response.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parsing the request: The server first parses the incoming request to determine what action it is being asked to perform and what resources are being requested.&lt;/li&gt;
&lt;li&gt;Routing the request: Once the server has parsed the request, it determines which application or service should handle the request. This is typically done using a routing table or configuration file.&lt;/li&gt;
&lt;li&gt;Authenticating the request: Depending on the security requirements of the application or service handling the request, the server may need to authenticate the client before processing the request. This may involve validating credentials or checking permissions.&lt;/li&gt;
&lt;li&gt;Handling the request: The server then passes the request to the appropriate application or service to handle the requested resource. This may involve executing code, querying a database, or serving a static file.&lt;/li&gt;
&lt;li&gt;Generating a response: Once the requested resource has been processed, the server generates a response and sends it back to the client. The response typically includes an HTTP status code, headers, and a message body.&lt;/li&gt;
&lt;li&gt;Closing the connection: Finally, the server closes the connection with the client. Depending on the server configuration, the connection may be kept open for a certain period for subsequent requests or closed immediately.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  6. Rendering the content
&lt;/h3&gt;

&lt;p&gt;Rendering of responses refers to the process of converting a server's response into a visual representation that can be displayed to the user. When a user requests a server via their browser, the server sends a response containing HTML, CSS, and JavaScript files.&lt;/p&gt;

&lt;p&gt;The browser then reads the response and begins to render the content. It starts by parsing the HTML and building the Document Object Model (DOM) tree, which represents the structure of the web page. Next, it parses the CSS to determine how the content should be styled, and it applies these styles to the appropriate elements in the DOM tree. Finally, it executes any JavaScript code included in the response to add interactivity and modify the content dynamically.&lt;/p&gt;

&lt;h3&gt;
  
  
  Monitoring and Managing traffic
&lt;/h3&gt;

&lt;p&gt;So far, we have looked at the cycle that happens from when you enter a URL up to the point you receive a rendered page. This is a single instance of how that happens. The internet has made the whole world a village, in that sense so many people across the globe interact with the internet. It is a normal scenario to have numerous requests for the same resource. One funny thing about software engineering or engineering as a whole is that you design for a worst-case scenario. Yes, worst-case scenarios, remember Big O notations for algorithms? This is the same when it comes to web development. While designing the web infrastructure, you have to assume you will have numerous if not many concurrent requests to the same resource, and also someone will try and access your resources without authorization and maybe with malicious intent.&lt;/p&gt;

&lt;h4&gt;
  
  
  Load Balancing
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QLsKzEvo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5lzpbqs8nzijyihgkei.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QLsKzEvo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z5lzpbqs8nzijyihgkei.png" alt="Load balancing" width="800" height="600"&gt;&lt;/a&gt;&lt;br&gt;
Some of the world's leading giant corporates are web-based. Talk of Meta, Twitter, and LinkedIn among others. Have you ever wondered how you get your Twitter feed refreshed in a matter of seconds? How you can always have access to your feed at any time of the day? When do they maintain their systems? Then a load balancer is your answer.&lt;br&gt;
A load balancer is a traffic manager that manages incoming traffic to a pool of servers. This is applicable when a distributed server system is used, where we have different web servers with the same resources and services distributed in different machine servers. Load balancing is a technique used in web infrastructure to distribute incoming network traffic across multiple servers. The main objective of load balancing is to prevent any single server from being overloaded with traffic, thereby ensuring the high availability and reliability of the web application.&lt;br&gt;
When a user sends a request to access a web application, the request first goes to the load balancer, which examines the request and decides which server in the pool is best suited to handle the request. The load balancer can use various algorithms to make this decision, such as round-robin, least connections, IP hash, or other custom algorithms. Once the load balancer has selected a server, it forwards the request to that server, which then processes the request and sends the response back to the user through the load balancer. The load balancer can also monitor the health and performance of the servers in the pool and redirect traffic away from any servers that are experiencing issues or are overloaded. This is also important in server predictive maintenance which helps in preventing server breakdowns before they break.&lt;/p&gt;

&lt;h4&gt;
  
  
  Firewalls
&lt;/h4&gt;

&lt;p&gt;Firewalls are used to provide security in networks and are used in the web infrastructure to protect an application from unauthorized access or malicious attacks. Remember that a lot of sensitive data like personal information, health records, and organization secrets among others is stored or shared across the web. This makes Firewalls a really important component in the web stack to ensure data does not fall into the wrong hands. A firewall network security system monitors both incoming and outgoing traffic on predetermined security rules.&lt;br&gt;
In a web infrastructure, firewalls are typically placed between the internet and the web servers to provide an additional layer of security. The firewall acts as a barrier between the internet and the web servers, filtering and blocking incoming traffic that does not comply with the predefined security rules.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>backend</category>
      <category>frontend</category>
    </item>
    <item>
      <title>The Ultimate Exploratory Data Analysis</title>
      <dc:creator>Maiyo</dc:creator>
      <pubDate>Tue, 28 Feb 2023 19:37:13 +0000</pubDate>
      <link>https://forem.com/maiyo008/the-ultimate-exploratory-data-analysis-58ek</link>
      <guid>https://forem.com/maiyo008/the-ultimate-exploratory-data-analysis-58ek</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Exploratory Data Analysis (EDA) is the process of examining and analyzing data sets to summarize their main characteristics and gain insights into their underlying structure, patterns, and relationships. EDA is typically used as a preliminary step before performing more complex statistical analysis or building predictive models.&lt;br&gt;
For this article I will explore &lt;a href="https://www.kaggle.com/datasets/parulpandey/2020-it-salary-survey-for-eu-region" rel="noopener noreferrer"&gt;this&lt;/a&gt; dataset from Kaggle and list down findings from it. This dataset  contains rich information about the salary patterns among the IT professionals in the EU region and offers some great insights.&lt;br&gt;
I will carry out my data analysis using python on a Jupyter notebook. Now let's get down to it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Importing Libraries and Loading Datasets
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd
import numpy as np
import matplotlib.pylab as plt
import seaborn as sns
plt.style.use('ggplot')

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The initial step in analyzing data using Python is to import python libraries that provide data analysis functionalities. These modules include pandas, numpy, matplotlib and seaborn. Here is a breakdown for the respective use of each module:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;pandas&lt;/strong&gt; - This is a common python library used for data manipulation, analysis, and cleaning. It provides data structures and functions for efficiently handling and processing large and complex data sets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;numpy&lt;/strong&gt; - It is a popular python library that is used for mathematical and scientific computing. It provides a powerful array computing feature that enables developers to perform complex mathematical operations on large arrays and matrices of numeric data.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;matplotlib&lt;/strong&gt; - The library is used for data visualization. It provides tools for creating a wide range of static, animated, and interactive visualizations in Python.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Seaborn&lt;/strong&gt; - Seaborn is a Python library that is built on top of Matplotlib and is primarily used for statistical data visualization. It provides a high-level interface for creating informative and attractive statistical graphics in Python.
From the python libraries, it is possible to carry out an exploratory data analysis which includes loading datasets, cleaning datasets, analysing datasets and finally visualizing findings from datasets.

&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df = pd.read_csv('IT Salary Survey EU  2020.csv', sep=',')
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To load the dataset, download it first from the link provided. Save the file on the same directory as that of the notebook being used. If the file is saved elsewhere note that the path to its location will be provided while loading the dataset.&lt;br&gt;
Once the data is downloaded it is good to open it and explore to find out it's separator value. Separator values can range from single spaces, tab spaces to commas.&lt;br&gt;
To load the dataset onto a data frame, we use pandas &lt;code&gt;read_csv&lt;/code&gt; method. The method takes in a string value representing the location of the dataset downloaded, and separator value specified as arguments.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding the dataset
&lt;/h2&gt;

&lt;p&gt;One of the most important step in carrying out EDA is understanding the dataset you are analyzing. Since the dataset can be very large, Pandas library offers methods that can simplify our work in exploring the dataset to understand it.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpbszmd4b5zl8o507go61.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpbszmd4b5zl8o507go61.png" alt="Number of columns and rows of dataframe" width="538" height="95"&gt;&lt;/a&gt;&lt;br&gt;
To know the size of the dataset, run &lt;code&gt;df.shape&lt;/code&gt;. From the result, the dataset has 1253 rows and 23 columns.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefyzzy0hojpk3jgqkao1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefyzzy0hojpk3jgqkao1.png" alt="To display first five rows" width="800" height="420"&gt;&lt;/a&gt;&lt;br&gt;
To display the first five rows of the dataset, run &lt;code&gt;df.head(5)&lt;/code&gt;. Note that you can specify any number of rows in this case by changing the integer value in the argument.&lt;br&gt;
The image above shows the results of the first five rows. The image itself cannot capture all the 23 columns but u can extend the columns by running &lt;code&gt;pd.set_option('max_columns', 200)&lt;/code&gt; at the import section.&lt;br&gt;
To display the last line of rows, the method is just changed, and it becomes &lt;code&gt;df.tail(5)&lt;/code&gt;. This line of code performs in the same manner as the &lt;code&gt;head&lt;/code&gt; method.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2k59i2ly0mv7kd58t18v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2k59i2ly0mv7kd58t18v.png" alt="Display column names" width="800" height="286"&gt;&lt;/a&gt;&lt;br&gt;
To list all the columns names i.e. all 23 of them, run the code &lt;code&gt;df.columns&lt;/code&gt;. This lists down all the column names as an array.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fspthackx4tgqtfv9wkf1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fspthackx4tgqtfv9wkf1.png" alt="Display column types" width="800" height="392"&gt;&lt;/a&gt;&lt;br&gt;
To display the column types, we run the code &lt;code&gt;df.dtypes&lt;/code&gt;. From the picture, the colums are of an object type as well as float type.&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pbdv3wdd86l2ya1s02s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5pbdv3wdd86l2ya1s02s.png" alt="Display statistical analysis" width="800" height="190"&gt;&lt;/a&gt;&lt;br&gt;
Finally to get information and statistics of the numerical data in the dataset, use the code &lt;code&gt;df.describe()&lt;/code&gt;. This method output statistical parameters such as count, mean , standard deviation, minimum, maximum, 25%, 50% and 75% percentiles for the numerical data within the dataset. Note that we only have four columns with numerical data inform of floats in the datasets.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleaning data
&lt;/h2&gt;

&lt;p&gt;Most of the datasets are going to be very large and contain lots of redundant information that might not be needed in the analysis. On the other hand, new columns can be derived from the already existing ones and added to the data frame to be analyzed.&lt;br&gt;
Cleaning of the data requires both a deep understanding of the dataset and the objective of the analysis. Cleaning of the data can involve:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dropping columns that are not required for analysis&lt;/li&gt;
&lt;li&gt;Updating the columns names to more appropriate names and removing whitespaces between column names&lt;/li&gt;
&lt;li&gt;Updating the columns data types to suit the type of data they hold for seamless analysis using python code.&lt;/li&gt;
&lt;li&gt;Checking for null values within the dataset and understanding their distribution.&lt;/li&gt;
&lt;li&gt;Checking for duplicate records in the dataset. When duplicates are found, they should be removed.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;From the initial 23 columns, some of the columns are supposed to be dropped for this analysis and retain only ten columns. The columns to be retained are:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Age&lt;/li&gt;
&lt;li&gt;Gender&lt;/li&gt;
&lt;li&gt;City&lt;/li&gt;
&lt;li&gt;Position&lt;/li&gt;
&lt;li&gt;Total years of experience&lt;/li&gt;
&lt;li&gt;Seniority level&lt;/li&gt;
&lt;li&gt;Main technology/programming language&lt;/li&gt;
&lt;li&gt;company size&lt;/li&gt;
&lt;li&gt;company type&lt;/li&gt;
&lt;li&gt;contract duration&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fobd8uec0n609m2css8sl.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fobd8uec0n609m2css8sl.png" alt="Dropping columns" width="800" height="356"&gt;&lt;/a&gt;&lt;br&gt;
To clean the data, it is advisable to create a subset of the original data frame which is large and complex. his can be useful when the dataset is very large and complex, and analyzing the entire dataset would be time-consuming or computationally challenging.&lt;br&gt;
For this dataset, a subset of only the 10 selected columns have been selected. The rest of the columns have been commented out just to clearly show which ones were dropped. When the &lt;code&gt;df.shape&lt;/code&gt; is run we note that the number of rows remain same as before but the columns reduce to ten.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshp0zao0k4do1gfwil2j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fshp0zao0k4do1gfwil2j.png" alt="Rename columns" width="800" height="182"&gt;&lt;/a&gt;&lt;br&gt;
The next step is to scrutinize the columns and check their data types and their naming conventions. As for this dataset, the data types were not altered. On the naming of columns, it is good practice to use short and concise names without whitespaces between  two words. Whitespaces will bring up errors when code implementation is done for the specific columns. The columns we renamed as shown above.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98xegxsrhrmsbfc97ie1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F98xegxsrhrmsbfc97ie1.png" alt="Null values" width="493" height="296"&gt;&lt;/a&gt;&lt;br&gt;
To check for null values, &lt;code&gt;isna&lt;/code&gt; method is used together with the common &lt;code&gt;sum&lt;/code&gt; method. From the results above it is clear that all columns apart from the city has null values.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh9iha3fdzxnprihxjjms.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh9iha3fdzxnprihxjjms.png" alt="Duplicate values" width="800" height="410"&gt;&lt;/a&gt;&lt;br&gt;
Next is to check for duplicates in the dataset. I looked for the duplicates but could not find a conclusive evidence of duplicated records. This is because the nature of the data lacks a unique identifier for every member that filled in the form, although this does not eliminate the fact that one could refill the form with the exact same details. To be on the safer side, I looked for duplicates in the subset data frame by using all the columns and did not find none. &lt;br&gt;
Up to this point, the dataset can now proceed for data analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Analyzing the data.
&lt;/h2&gt;

&lt;p&gt;To analyze  the data subset, data visualization tools come in handy in this case. Features of the data can be analyzed individually through univariate analysis or can be compared against each other through correlation.&lt;br&gt;
This data frame subset merely has numerical values for simple numerical analysis using histograms, boxplots, scatter diagrams among other visualization diagrams.&lt;br&gt;
For this tutorial I was able to do an example of numerical analysis of the age feature. Here are the findings:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmf24zeduufnx25u5l96q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fmf24zeduufnx25u5l96q.png" alt=" " width="800" height="364"&gt;&lt;/a&gt;&lt;br&gt;
The age feature was plotted on a histogram. From the histogram the following is gathered from the age of employees who undertook this survey:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most of the employees employed in IT in Europe are around 30 years.&lt;/li&gt;
&lt;li&gt;From the histogram we can also note that the distribution of age ranges from 20 to almost 70 years
This is one of the  examples of feature analysis. I would have wanted to explore every feature, but my skillset currently limits me to do an analysis on text based data which is the majority on this data subset, might as well take it up as a challenge and do a dedicated article on it after learning it.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  References
&lt;/h2&gt;

&lt;p&gt;Here's a link for my Jupyter notebook I used for this tutorial.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://github.com/maiyo008/Data_Career_Bootcamp/blob/main/Week02/Project/Ultimate_EDA.ipynb" rel="noopener noreferrer"&gt;Ultimate_EDA.ipynb&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>svelte</category>
      <category>dataviz</category>
      <category>devex</category>
      <category>software</category>
    </item>
  </channel>
</rss>
