<?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>DEV Community: Esther Njihia</title>
    <description>The latest articles on DEV Community by Esther Njihia (@esther_njihia).</description>
    <link>https://dev.to/esther_njihia</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F815150%2F8788c6d0-cb4d-4e01-a9ee-826c4c7a532a.png</url>
      <title>DEV Community: Esther Njihia</title>
      <link>https://dev.to/esther_njihia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/esther_njihia"/>
    <language>en</language>
    <item>
      <title>From MKDIR to GIT PUSH: What Actually Happens to a Project?</title>
      <dc:creator>Esther Njihia</dc:creator>
      <pubDate>Sun, 23 Aug 2026 07:02:43 +0000</pubDate>
      <link>https://dev.to/esther_njihia/from-mkdir-to-git-push-what-actually-happens-to-a-project-1ang</link>
      <guid>https://dev.to/esther_njihia/from-mkdir-to-git-push-what-actually-happens-to-a-project-1ang</guid>
      <description>&lt;p&gt;The first time you see a Git workflow, it can look like a list of commands you are supposed to memorize:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add.
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Three commands, and somehow the project ends up on GitHub.&lt;/p&gt;

&lt;p&gt;But what actually happens between creating a folder on your computer and seeing that project in a GitHub repository?&lt;/p&gt;

&lt;p&gt;The commands become much easier to understand when you stop treating them as a sequence to memorize and start seeing them as &lt;strong&gt;different stages in a workflow&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In this article, we discussed a small Git Workflow, from creating a directory to your code being available on GitHub.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mkdir
  ↓
git init
  ↓
git add
  ↓
git commit
  ↓
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The goal is not simply to learn what each command means, but to understand &lt;strong&gt;where the project is at each stage and what changes after every command.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does this workflow matter?
&lt;/h2&gt;

&lt;p&gt;When creating a project on your computer.&lt;/p&gt;

&lt;p&gt;You create a folder, add some files, and start making changes.&lt;/p&gt;

&lt;p&gt;At some point, you want Git to keep track of those changes. Eventually, you may also want the project's history to be available on GitHub. Simply put, local files store your work, Git tracks how it changes over time, and GitHub backs up and shares those tracked changes with the world.&lt;/p&gt;

&lt;p&gt;It is tempting to think that Git takes the files on your computer and uploads them to GitHub.&lt;/p&gt;

&lt;p&gt;That is not what happens.&lt;/p&gt;

&lt;p&gt;There are several stages between the files you are editing locally and the repository hosted remotely.&lt;/p&gt;

&lt;p&gt;A simplified version looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Working Directory
       ↓
Staging Area
       ↓
Local Repository
       ↓
Remote Repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Understanding these four places is the key to understanding the Git workflow.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Working Directory: where the project starts
&lt;/h2&gt;

&lt;p&gt;Everything starts with a directory on your computer.&lt;/p&gt;

&lt;p&gt;For this walkthrough, create a small Git sandbox:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;mkdir &lt;/span&gt;git-workflow-demo
&lt;span class="nb"&gt;cd &lt;/span&gt;git-workflow-demo
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The project can contain two simple files:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git-workflow-demo/
├── README.md
└── hello.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, these are simply files inside a directory.&lt;/p&gt;

&lt;p&gt;Git has not started tracking the project yet.&lt;/p&gt;

&lt;p&gt;This is the &lt;strong&gt;working directory&lt;/strong&gt;: the location where the project files exist and where changes are made.&lt;/p&gt;

&lt;p&gt;For example, &lt;code&gt;hello.py&lt;/code&gt; might contain:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello, Git!&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If the file is edited, the change happens directly in the working directory.&lt;/p&gt;

&lt;p&gt;But there is an important question:&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;How does Git know which changes should become part of the project's history? *&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;That is where Git's repository and staging area come in.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. &lt;code&gt;git init&lt;/code&gt;: turning the folder into a Git repository
&lt;/h2&gt;

&lt;p&gt;Before Git can track the project, initialize a repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This creates the Git metadata needed for the directory to become a Git repository.&lt;/p&gt;

&lt;p&gt;The project is still in the same location, but Git can now start managing its history.&lt;/p&gt;

&lt;p&gt;The transition looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Regular project folder
        ↓
     git init
        ↓
Git repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A useful command to run immediately after this is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;git status&lt;/code&gt; provides information about the current state of the repository.&lt;/p&gt;

&lt;p&gt;It helps answer questions such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What files have changed?&lt;/li&gt;
&lt;li&gt;What files are untracked?&lt;/li&gt;
&lt;li&gt;What changes are staged?&lt;/li&gt;
&lt;li&gt;What changes are ready to be committed?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Rather than guessing what Git knows about, &lt;code&gt;git status&lt;/code&gt; lets you inspect the repository's current state.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. The Staging Area: choosing what to record
&lt;/h2&gt;

&lt;p&gt;Suppose &lt;code&gt;README.md&lt;/code&gt; has been created or modified.&lt;/p&gt;

&lt;p&gt;You can stage it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is one of the most important distinctions for anyone learning Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;git add&lt;/code&gt; does not upload the file to GitHub.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Instead, it tells Git:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Include this change in the next commit.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The staging area therefore sits between the working directory and the local repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Working Directory
       │
       │ git add
       ▼
Staging Area
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can verify the state with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This shows that the change has moved from an unstaged state to a staged state.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why have a staging area?
&lt;/h3&gt;

&lt;p&gt;The staging area gives you control over what goes into a commit.&lt;/p&gt;

&lt;p&gt;Imagine three files have changed:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;app.py
README.md
config.py
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You might decide that only the changes to &lt;code&gt;app.py&lt;/code&gt; and &lt;code&gt;README.md&lt;/code&gt; belong in the next commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add app.py README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now those selected changes are staged, while &lt;code&gt;config.py&lt;/code&gt; can remain unstaged.&lt;/p&gt;

&lt;p&gt;This is one reason Git is more than a simple file-uploading tool.&lt;/p&gt;

&lt;p&gt;It gives you a way to &lt;strong&gt;select the changes you want to record together&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. &lt;code&gt;git commit&lt;/code&gt;: creating a point in project history
&lt;/h2&gt;

&lt;p&gt;Once the desired changes have been staged, create a commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add README"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A commit is a recorded point in the project's history.&lt;/p&gt;

&lt;p&gt;The workflow is now:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Working Directory
       ↓
    git add
       ↓
Staging Area
       ↓
   git commit
       ↓
Local Repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The local repository now contains a record of the staged changes.&lt;/p&gt;

&lt;p&gt;But there is an important distinction:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The commit has not been sent to GitHub yet.&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;This is where most confuse &lt;strong&gt;commit&lt;/strong&gt; with &lt;strong&gt;push&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Think of the two commands this way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git commit
→ Records the staged changes locally

git push
→ Sends local commits to a remote repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A commit and a push are therefore two separate operations.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. A small experiment: watch the state change
&lt;/h2&gt;

&lt;p&gt;One of the easiest ways to understand Git is to observe what happens after each command.&lt;/p&gt;

&lt;p&gt;Start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Stage the README:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add README.md
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Check the status again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Create the commit:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Add README"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then check again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The important part of this exercise is not simply running the commands.&lt;/p&gt;

&lt;p&gt;It is observing how the repository's state changes.&lt;/p&gt;

&lt;p&gt;You can think of the experiment as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Before git add
        ↓
Working Directory

After git add
        ↓
Staging Area

After git commit
        ↓
Local Repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That makes the workflow easier to understand than memorizing a sequence of commands without knowing what each one is doing.&lt;/p&gt;

&lt;h2&gt;
  
  
  6. What changes after each command?
&lt;/h2&gt;

&lt;p&gt;Here is the entire workflow in one place:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Command&lt;/th&gt;
&lt;th&gt;What changes?&lt;/th&gt;
&lt;th&gt;Where are the changes?&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git init&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Creates Git metadata&lt;/td&gt;
&lt;td&gt;Local project&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git add&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Selects changes for the next commit&lt;/td&gt;
&lt;td&gt;Staging area&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git commit&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Records staged changes&lt;/td&gt;
&lt;td&gt;Local repository&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;git push&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Sends local commits to the remote&lt;/td&gt;
&lt;td&gt;GitHub&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The important idea is that &lt;strong&gt;each command has a different responsibility&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That is why the commands should not be thought of as interchangeable.&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Where does GitHub come in?
&lt;/h2&gt;

&lt;p&gt;So far, everything has happened on the local computer.&lt;/p&gt;

&lt;p&gt;The working directory is local.&lt;/p&gt;

&lt;p&gt;The staging area is local.&lt;/p&gt;

&lt;p&gt;The Git repository containing the commit history is local.&lt;/p&gt;

&lt;p&gt;GitHub becomes involved when a &lt;strong&gt;remote repository&lt;/strong&gt; is connected.The local repository and the GitHub repository are separate repositories.&lt;/p&gt;

&lt;p&gt;The next step is to connect them.&lt;/p&gt;

&lt;h2&gt;
  
  
  8. Connecting the local repository to GitHub
&lt;/h2&gt;

&lt;p&gt;After creating an empty repository on GitHub, connect it to the local repository with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote add origin git@github.com:username/git-workflow-demo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here, &lt;code&gt;origin&lt;/code&gt; is the name given to the remote repository.&lt;/p&gt;

&lt;p&gt;You can check the configured remote with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git remote &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, Git knows where the remote repository is.&lt;/p&gt;

&lt;p&gt;But the local commits are still local.&lt;/p&gt;

&lt;p&gt;They have not been sent to GitHub yet. That requires &lt;code&gt;git push&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  9. Where SSH fits and what it does
&lt;/h2&gt;

&lt;p&gt;If the remote URL looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git@github.com:username/git-workflow-demo.git
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the repository is being accessed through SSH.&lt;/p&gt;

&lt;p&gt;SSH provides an authenticated way for your computer to communicate with GitHub.&lt;/p&gt;

&lt;p&gt;The basic idea is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Your computer
     │
     │ SSH authentication
     ▼
   GitHub
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Before Git can communicate with GitHub through SSH, an SSH key needs to be configured and associated with the GitHub account.&lt;/p&gt;

&lt;p&gt;The important point for the Git workflow is that &lt;strong&gt;SSH is about authentication and communication with the remote repository&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is not another version of &lt;code&gt;git add&lt;/code&gt; or &lt;code&gt;git commit&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Those commands manage the local Git workflow. SSH helps establish the connection to GitHub.&lt;/p&gt;

&lt;h2&gt;
  
  
  10. Finally: &lt;code&gt;git push&lt;/code&gt;
&lt;/h2&gt;

&lt;p&gt;Now the local commit can be sent to the remote repository:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the step where the local Git history is transferred to the configured remote repository.&lt;/p&gt;

&lt;p&gt;The complete workflow now looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;┌──────────────────────────┐
│    Working Directory     │
│                          │
│   Files are created or   │
│        modified          │
└────────────┬─────────────┘
             │
          git add
             │
             ▼
┌──────────────────────────┐
│      Staging Area        │
│                          │
│ Changes selected for the │
│      next commit         │
└────────────┬─────────────┘
             │
         git commit
             │
             ▼
┌──────────────────────────┐
│    Local Repository      │
│                          │
│   Commit history exists  │
│        locally           │
└────────────┬─────────────┘
             │
          git push
             │
             ▼
┌──────────────────────────┐
│    Remote Repository     │
│         GitHub           │
└──────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So what actually happened to the project?&lt;/p&gt;

&lt;p&gt;It did not simply jump from the computer to GitHub.&lt;/p&gt;

&lt;p&gt;It moved through a series of stages.&lt;/p&gt;

&lt;h1&gt;
  
  
  A common beginner misconception
&lt;/h1&gt;

&lt;p&gt;One of the easiest things to misunderstand when learning Git is that &lt;code&gt;git add&lt;/code&gt;, &lt;code&gt;git commit&lt;/code&gt;, and &lt;code&gt;git push&lt;/code&gt; all somehow "move the code."&lt;/p&gt;

&lt;p&gt;They do—but &lt;strong&gt;not to the same place&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Consider this simplified model:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git add
→ Select changes for the next commit

git commit
→ Record those staged changes locally

git push
→ Send those local commits to the remote repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The commands are connected, but each one operates at a different stage of the workflow.&lt;/p&gt;

&lt;p&gt;This distinction becomes particularly important when something does not behave as expected.&lt;/p&gt;

&lt;p&gt;If a file is not included in a commit, the first question should not be:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Why didn't GitHub update?"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A better question is:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;"At which stage did the change stop?"&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Was it:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;never changed in the working directory?&lt;/li&gt;
&lt;li&gt;not staged?&lt;/li&gt;
&lt;li&gt;not committed?&lt;/li&gt;
&lt;li&gt;committed locally but not pushed?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Understanding the workflow makes those questions much easier to answer.&lt;/p&gt;

&lt;h1&gt;
  
  
  The bigger lesson: Git is a workflow, not a command list
&lt;/h1&gt;

&lt;p&gt;It is possible to memorize:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"message"&lt;/span&gt;
git push
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and still have very little understanding of Git.&lt;/p&gt;

&lt;p&gt;A better mental model is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;"I changed something."
        ↓
Working Directory

"I want this change included."
        ↓
Staging Area

"I want to record this version."
        ↓
Local Repository

"I want that recorded history on GitHub."
        ↓
Remote Repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the purpose of each stage is clear, the commands become easier to remember because each command answers a specific need.&lt;/p&gt;

&lt;p&gt;That is more useful than memorizing a command sequence without understanding what happens between the commands.&lt;/p&gt;

&lt;h2&gt;
  
  
  5 takeaways from the Git workflow
&lt;/h2&gt;

&lt;h4&gt;
  
  
  1. The working directory is where changes are made.
&lt;/h4&gt;

&lt;p&gt;This is where project files are created, edited, and deleted.&lt;/p&gt;

&lt;h4&gt;
  
  
  2. The staging area lets you choose what goes into the next commit.
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;git add&lt;/code&gt; prepares selected changes for recording.&lt;/p&gt;

&lt;h4&gt;
  
  
  3. A commit records staged changes locally.
&lt;/h4&gt;

&lt;p&gt;A commit creates a point in the project's history.&lt;/p&gt;

&lt;h4&gt;
  
  
  4. A push sends local commits to a remote repository.
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;git push&lt;/code&gt; is what moves committed history from the local repository to the configured remote.&lt;/p&gt;

&lt;h4&gt;
  
  
  5. Understanding the workflow is more useful than memorizing commands.
&lt;/h4&gt;

&lt;p&gt;When the purpose of each stage is clear, Git commands become easier to reason about.&lt;/p&gt;

&lt;h1&gt;
  
  
  What happens when more than one person changes the project?
&lt;/h1&gt;

&lt;p&gt;The basic workflow is only the beginning.&lt;/p&gt;

&lt;p&gt;Once a repository becomes collaborative, another set of questions appears:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;What happens when two people work on the same project?&lt;/li&gt;
&lt;li&gt;What is a branch?&lt;/li&gt;
&lt;li&gt;Why create a branch instead of working directly on &lt;code&gt;main&lt;/code&gt;?&lt;/li&gt;
&lt;li&gt;How are changes reviewed before they become part of the main project?&lt;/li&gt;
&lt;li&gt;What happens when two people modify the same part of a file?&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Those questions lead to the next part of the Git workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;branches → pull requests → merging → merge conflicts → collaborative Git workflows.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For now, the most useful mental model is simple:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Working Directory
       ↓
   git add
       ↓
Staging Area
       ↓
 git commit
       ↓
Local Repository
       ↓
  git push
       ↓
Remote Repository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Git is not just the tool used to put code on GitHub. It is a system for &lt;strong&gt;tracking, organizing, recording, and sharing changes to a project over time&lt;/strong&gt;.&lt;/p&gt;

</description>
      <category>git</category>
      <category>github</category>
      <category>githubactions</category>
    </item>
    <item>
      <title>Analysis of 120 Years of Olympics Data</title>
      <dc:creator>Esther Njihia</dc:creator>
      <pubDate>Sun, 22 Jan 2023 06:12:18 +0000</pubDate>
      <link>https://dev.to/esther_njihia/analysis-of-120-years-of-olympics-data-13jl</link>
      <guid>https://dev.to/esther_njihia/analysis-of-120-years-of-olympics-data-13jl</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The Olympic Games are one of the most prestigious and widely-followed sporting events in the world. With a history dating back over a century, the Olympics have seen countless athletes from all corners of the globe compete for glory and honor. In this project, we will use Python, SQL and Tableau to analyze 120 years of Olympics data sourced from Kaggle.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Collection
&lt;/h2&gt;

&lt;p&gt;The data for this analysis was sourced from Kaggle and includes information on athletes, teams, events, and medals. The data was collected for all Summer and Winter Olympics from 1896 to 2016.&lt;br&gt;
Data source: &lt;a href="https://www.kaggle.com/datasets/heesoo37/120-years-of-olympic-history-athletes-and-results" rel="noopener noreferrer"&gt;Kaggle&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Data Cleaning and Preparation
&lt;/h2&gt;

&lt;p&gt;Before we could begin our analysis, the data needed to be cleaned and prepared for use. This involved removing any duplicate or irrelevant data, correcting any errors or inconsistencies, and formatting the data in a way that would be compatible with our analysis tools.&lt;/p&gt;
&lt;h2&gt;
  
  
  Data Cleaning with Python
&lt;/h2&gt;

&lt;p&gt;Load data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;pd&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;read_csv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;data/athlete_events.csv&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Calculate the number of missing values in the data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;isnull&lt;/span&gt;&lt;span class="p"&gt;().&lt;/span&gt;&lt;span class="nf"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We got some missing values with the age, height and weight variables. How about we fix that.&lt;br&gt;
Fill in the age missing values with its mean.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Age&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;fillna&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;df&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Age&lt;/span&gt;&lt;span class="sh"&gt;'&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;mean&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="n"&gt;inplace&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Repeat the same for the height and weight variables.&lt;/p&gt;

&lt;h2&gt;
  
  
  SQL Analysis
&lt;/h2&gt;

&lt;p&gt;Once the data was cleaned and prepared, we used SQL to extract and analyze the data. We were able to answer questions such as:&lt;br&gt;
1.What is the Gender distribution of athletes across different sports and event?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;Sport&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Sex&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;athlete_count&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Athlete&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;Sport&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Event&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Sex&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;athlete_count&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;2.Which city and season have the most successful athletes?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;City&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Season&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Medal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;Medal_count&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Athlete&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;Medal&lt;/span&gt; &lt;span class="k"&gt;IS&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;City&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Season&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;Medal_count&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;3.Which athletes are the most successful in terms of number of medals?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Medal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;medal_count&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Athlete&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;Name&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;medal_count&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;4.Trend analysis to identify any patterns in the number of medals over time&lt;br&gt;
By year&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="nb"&gt;Year&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Medal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;medal_count&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Athlete&lt;/span&gt;
&lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="nb"&gt;Year&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="nb"&gt;Year&lt;/span&gt; &lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;5.Use statistical analysis to find factors associated with winning more medals.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;first create a sub query to find the total count of medals per city and season
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;city_season_medals&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;City&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Season&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="k"&gt;COUNT&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;Medal&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;medal_count&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;Athlete&lt;/span&gt;
    &lt;span class="k"&gt;GROUP&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;City&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Season&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;use statistical methods to find the relationship between city &amp;amp; season and the total number of medals. Fo this instance I used z-score. The higher the z-score the higher the correlation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;City&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;Season&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;medal_count&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;medal_count&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="k"&gt;AVG&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;medal_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="n"&gt;STDEV&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;medal_count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;OVER&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="n"&gt;z_score&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;city_season_medals&lt;/span&gt;
&lt;span class="k"&gt;ORDER&lt;/span&gt; &lt;span class="k"&gt;BY&lt;/span&gt; &lt;span class="n"&gt;z_score&lt;/span&gt; &lt;span class="k"&gt;DESC&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are some of the questions that were answered during the SQL analysis.&lt;/p&gt;

&lt;h2&gt;
  
  
  Visualization with Tableau
&lt;/h2&gt;

&lt;p&gt;To make the data more accessible and understandable, Tableau was used to create visualizations of our findings. Some of the visualizations we created include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A pie chart showing the gender distribution across all sports&lt;/li&gt;
&lt;li&gt;A bar chart showing the most successful athletes over time.&lt;/li&gt;
&lt;li&gt;line charts to show trends and patterns in the number of medals won over time&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;View the whole Olympics dashboard:&lt;a href="https://public.tableau.com/app/profile/esther7982/viz/OlympicAnalysis_16743097934740/Olympicsdashboard" rel="noopener noreferrer"&gt;Olympics Dashboard&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Through this analysis, I was able to gain a deeper understanding of the history of the Olympics and the performances of countries and athletes over the past 120 years. By using SQL and Tableau, I was able to extract valuable insights from the data and present them in a clear and accessible way.&lt;/p&gt;

&lt;h2&gt;
  
  
  Code and Data
&lt;/h2&gt;

&lt;p&gt;The code and data used for this project is available at &lt;a href="https://github.com/EstherNjihia/120-Years-of-Olympics" rel="noopener noreferrer"&gt;Github&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By using the above techniques, we can also use the data to predict future results, and also to identify patterns and trends that can be used to improve performance and achieve success in future Olympic games.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
    <item>
      <title>Data engineering 102: Introduction to python for data engineering.</title>
      <dc:creator>Esther Njihia</dc:creator>
      <pubDate>Sun, 04 Sep 2022 20:39:09 +0000</pubDate>
      <link>https://dev.to/esther_njihia/data-engineering-102-introduction-to-python-for-data-engineering-52p1</link>
      <guid>https://dev.to/esther_njihia/data-engineering-102-introduction-to-python-for-data-engineering-52p1</guid>
      <description>&lt;h2&gt;
  
  
  Overview
&lt;/h2&gt;

&lt;p&gt;The most interesting thing about python language is sort of all rounded. Due to its readability which is easy and the fact that it has very many applications including data engineering. In this post, we will discuss the most important concepts in the python language.&lt;/p&gt;

&lt;h3&gt;
  
  
  Python Syntax
&lt;/h3&gt;

&lt;p&gt;Python, builds the code structure using whitespace and indentation. &lt;/p&gt;

&lt;h4&gt;
  
  
  Comments
&lt;/h4&gt;

&lt;p&gt;The comments are just as crucial as the code itself, because they explain why a piece of code was produced&lt;br&gt;
The comments are ignored by the Python interpreter when it runs the code.&lt;br&gt;
A single line comment in Python starts with the hash symbol (#), which is followed by the comment.&lt;/p&gt;

&lt;h4&gt;
  
  
  Identifiers
&lt;/h4&gt;

&lt;p&gt;Python uses identifiers, or names, to designate variables, functions, modules, classes, and other types of objects.&lt;br&gt;
An identifier's name must begin with a letter or an underscore. After that, only underscores or alphanumeric characters are allowed.&lt;/p&gt;

&lt;h4&gt;
  
  
  Keywords
&lt;/h4&gt;

&lt;p&gt;Keywords are words that have special meaning in python. Python has a special module keyword that outlines all the keywords that are used in the Python Language.&lt;/p&gt;

&lt;h3&gt;
  
  
  Control statements
&lt;/h3&gt;

&lt;h4&gt;
  
  
  If statements.
&lt;/h4&gt;

&lt;p&gt;If statements are conditional statements. Below is the summary of the different if statements:&lt;br&gt;
When you want to run a code block based on a condition, use the if statement.&lt;br&gt;
If you want to execute a different code block if the condition is not True, use the if...else statement.&lt;br&gt;
When you wish to check multiple conditions and execute the associated code block after the condition that evaluates to True, use the if...elif...else statement.&lt;/p&gt;

&lt;h4&gt;
  
  
  for loop
&lt;/h4&gt;

&lt;p&gt;A code block can be performed a predetermined number of times by using the for loop statement.&lt;br&gt;
To alter the loop, use the range(start, stop, step).&lt;/p&gt;

&lt;h4&gt;
  
  
  while loop.
&lt;/h4&gt;

&lt;p&gt;If a condition is True, use the Python while loop statement to run a code block.&lt;/p&gt;

&lt;h3&gt;
  
  
  Functions
&lt;/h3&gt;

&lt;p&gt;A named, reusable chunk of code called a function in Python executes a command or returns a value.&lt;br&gt;
Create a new function by using the def keyword. The function definition and body make up a function.&lt;br&gt;
A function may have 0 parameters or more. You must pass a function the same amount of arguments if it has one or more parameters.&lt;br&gt;
A function can do a task or give back a value. If you want to return a value from a function, use the return statement.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lists
&lt;/h3&gt;

&lt;p&gt;An orderly group of elements is referred to as a list.&lt;br&gt;
If you want to retrieve a list element by its index, use the square bracket notation []. The index of the first element is zero.&lt;br&gt;
To reach a list element from the list's end, use a negative index. The final component has an index of -1.&lt;br&gt;
To change an entry from a list, use list[index] = new value.&lt;br&gt;
To add a new element to the end of a list, use the append() method.&lt;br&gt;
To insert a new element at a certain location in a list, use insert().&lt;br&gt;
To remove an entry from a list and return it, use the pop() function.&lt;br&gt;
To eliminate an element from a list, use remove().&lt;br&gt;
Tuples are immutable lists.&lt;br&gt;
Use tuples when you want to define a list that cannot change.&lt;/p&gt;

&lt;h3&gt;
  
  
  Dictionary
&lt;/h3&gt;

&lt;p&gt;A Python dictionary is a group of key-value pairs, each of which has a corresponding value.&lt;br&gt;
In order to access a value by its key, use square brackets or the get() method.&lt;br&gt;
To remove a key-value pair by the key from a dictionary, use the del statement.&lt;br&gt;
To iterate through the keys, values, and key-value pairs in a dictionary, use a for loop.&lt;/p&gt;

&lt;p&gt;This post includes a summarization of some most important concepts as a beginner in Python.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
    </item>
  </channel>
</rss>
