<?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: Josephine Mackylah</title>
    <description>The latest articles on DEV Community by Josephine Mackylah (@josephine_mackylah_d6b31f).</description>
    <link>https://dev.to/josephine_mackylah_d6b31f</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%2F3951430%2Fd08f9975-c3a2-4199-bc01-e97d7c835686.jpg</url>
      <title>DEV Community: Josephine Mackylah</title>
      <link>https://dev.to/josephine_mackylah_d6b31f</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/josephine_mackylah_d6b31f"/>
    <language>en</language>
    <item>
      <title>Just These 10 Python Concepts Will Get You Started</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Tue, 01 Sep 2026 13:32:11 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/just-these-10-python-concepts-will-get-you-started-4p12</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/just-these-10-python-concepts-will-get-you-started-4p12</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;Learning Python is a lot like building with blocks. You don't start with the roof you start with one block, set it down properly, then place the next one on top of it. Skip a step, or rush past something you didn't fully understand, and everything you try to stack on top of it starts to wobble.&lt;/p&gt;

&lt;p&gt;That's exactly how these ten concepts work. You can't really understand a loop until you understand a list. You can't understand a function until you've written a few conditional statements by hand. Even something as simple as &lt;code&gt;print()&lt;/code&gt; sets you up for f-strings a few sections later. Nothing here exists on its own each concept quietly leans on the one before it, and sets up the one that comes next.&lt;/p&gt;

&lt;p&gt;So take your time with this one. Don't skim ahead looking for the "advanced" part there isn't one yet. Understand each block before you place the next, and by the end, you won't just have memorized ten separate ideas. You'll have built a foundation sturdy enough to hold whatever you decide to learn next.&lt;/p&gt;

&lt;p&gt;Let's lay the first block.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Is Python?
&lt;/h2&gt;

&lt;p&gt;Python is a programming language known for reading almost like plain English. Where some languages demand semicolons, brackets, and rigid formatting just to print a sentence, Python lets you write &lt;code&gt;print("Hello")&lt;/code&gt; and move on with your day. That simplicity is exactly why it's one of the most widely used languages in the world.&lt;/p&gt;

&lt;p&gt;Here's what that looks like in practice. Instagram uses Python behind the scenes to help run parts of its app. Spotify uses it to help decide what song to play next. Netflix uses it to help figure out what show to recommend you. Even simple, everyday things like a script that renames a hundred files at once, or a program that checks the weather and texts you if it's going to rain are the kind of small, practical tasks Python is great at.&lt;/p&gt;

&lt;p&gt;You don't need to build anything as big as Netflix to benefit from Python. Even the smallest script that saves you five minutes of repetitive work is Python doing exactly what it's meant to do.&lt;/p&gt;

&lt;h2&gt;
  
  
  Variables: Giving Your Data a Name
&lt;/h2&gt;

&lt;p&gt;A variable is a labeled container for a value. Instead of retyping someone's age every time you need it, you store it once and refer to it by name:&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Josephine Mackylah&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;
&lt;span class="n"&gt;city&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Nairobi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Think of variables the way you'd think of cell references in a spreadsheet. You don't retype the number in B2 everywhere you need it you just reference B2. Variables are Python's version of that same convenience, except the name is whatever you choose, which makes code far easier to read six months later than a spreadsheet full of &lt;code&gt;B2&lt;/code&gt; and &lt;code&gt;D17&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Data Types: Python Needs to Know &lt;em&gt;What Kind&lt;/em&gt; of Value It's Holding
&lt;/h2&gt;

&lt;p&gt;Every variable holds a value, and every value has a type. As a beginner, you'll mostly work with four of them:&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Josephine Mackylah&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;    &lt;span class="c1"&gt;# str (string) — text
&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;25&lt;/span&gt;                        &lt;span class="c1"&gt;# int (integer) — whole numbers
&lt;/span&gt;&lt;span class="n"&gt;salary&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mf"&gt;14100000.50&lt;/span&gt;            &lt;span class="c1"&gt;# float — decimal numbers
&lt;/span&gt;&lt;span class="n"&gt;is_active&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;                 &lt;span class="c1"&gt;# bool (boolean) — True or False
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This matters more than it sounds like it should. Python won't let you add a number to a piece of text &lt;code&gt;"Salary: " + 14100000.50&lt;/code&gt; throws an error, because one side is a string and the other is a number. You'd have to convert it first: &lt;code&gt;"Salary: " + str(14100000.50)&lt;/code&gt;. This single rule that Python cares deeply about type explains more beginner error messages than anything else in the language, so it's worth internalizing early rather than treating it as an annoyance.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;print()&lt;/code&gt;: Making Python Talk Back to You
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;print()&lt;/code&gt; is how Python shows you something on screen. It's the very first tool you'll reach for, and you'll never stop using it even experienced programmers sprinkle &lt;code&gt;print()&lt;/code&gt; statements everywhere while checking their work.&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;Python is&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;great&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;&lt;strong&gt;Output:&lt;/strong&gt;&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;Python&lt;/span&gt; &lt;span class="ow"&gt;is&lt;/span&gt; &lt;span class="n"&gt;great&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every time you want to check whether something did what you expected, &lt;code&gt;print()&lt;/code&gt; is how you look.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;code&gt;input()&lt;/code&gt;: Letting a Human Talk Back to Python
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;input()&lt;/code&gt; does the reverse it pauses your program and waits for someone to type something in:&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;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;How old are you? &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&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;You are&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;years old&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;&lt;strong&gt;Output&lt;/strong&gt; (if age = 25)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;How old are you? 25
You are 25 years old
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You won't use &lt;code&gt;input()&lt;/code&gt; in every single program, but it's what makes your code feel interactive instead of static. It's the difference between a script that just runs the same way every time, and one that actually responds to the person using it like a simple quiz, a to-do list that asks what you want to add, or a small calculator that asks for two numbers before doing the math.&lt;/p&gt;

&lt;h2&gt;
  
  
  F-Strings: The Cleanest Way to Combine Text and Data
&lt;/h2&gt;

&lt;p&gt;Early on, combining text and variables looks clumsy:&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 &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;! You are &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;str&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt; years old.&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;&lt;strong&gt;Output&lt;/strong&gt; (using &lt;code&gt;name = "Josephine Mackylah"&lt;/code&gt; and &lt;code&gt;age = 25&lt;/code&gt; from earlier):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello Josephine Mackylah! You are 25 years old.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;F-strings fix that. Put an &lt;code&gt;f&lt;/code&gt; before the quotation marks, and drop your variables straight into the sentence using curly braces:&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter your name: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter your 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;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Hello &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt;! You are &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;age&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; years old.&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;&lt;strong&gt;Output&lt;/strong&gt; (if the person enters "Josephine" and 25):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter your name: Josephine
Enter your age: 25
Hello Josephine! You are 25 years old.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No &lt;code&gt;+&lt;/code&gt;, no &lt;code&gt;str()&lt;/code&gt; conversions, no broken sentences from missing spaces. F-strings are the standard way modern Python code combines text and values, and once you start using them, going back to the old way feels genuinely painful.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conditional Statements: Teaching Python to Make Decisions
&lt;/h2&gt;

&lt;p&gt;A conditional statement lets your code branch based on a condition the Python equivalent of an Excel &lt;code&gt;IF&lt;/code&gt; formula.&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;score&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter score: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Grade A - Excellent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Grade B - Good&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Grade C - Average&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Grade D - Below Average&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Grade F - Failed&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;&lt;strong&gt;Output&lt;/strong&gt; (if score = 85):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter score: 85
Grade A - Excellent
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is the logic behind almost every decision your code will ever need to make checking a score, deciding whether someone qualifies for something, choosing what message to show based on a condition. Once conditionals click, you'll start noticing them everywhere: a rule you'd normally explain out loud in a sentence is really just a conditional statement, waiting to be written in code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Loops: Doing Something Once, Then Doing It Again and Again
&lt;/h2&gt;

&lt;p&gt;A loop repeats an action across a collection of items, so you never have to write the same line 50 times:&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;foods&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;chapati&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;ugali&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;pilau&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;githeri&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;mandazi&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;food&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;foods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;food&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;chapati
ugali
pilau
githeri
mandazi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
2
3
4
5
6
7
8
9
10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;correct_password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;kenya2024&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;span class="n"&gt;attempts&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;while&lt;/span&gt; &lt;span class="bp"&gt;True&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter password: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;attempts&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="n"&gt;correct_password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;break&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Correct! It took &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;attempts&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; attempts.&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;&lt;strong&gt;Output&lt;/strong&gt; &lt;em&gt;(if the person types "jojo" first, then "kenya2024"):&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Enter password: jojo
Enter password: kenya2024
Correct! It took 2 attempts.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Notice the three different shapes a loop can take here: a &lt;code&gt;for&lt;/code&gt; loop stepping through a known list, a &lt;code&gt;while&lt;/code&gt; loop counting up to a number, and a &lt;code&gt;while True&lt;/code&gt; loop that keeps going until something specific happens (&lt;code&gt;break&lt;/code&gt;). As you keep coding, you'll come across tools that quietly do looping for you behind the scenes but understanding what a loop actually does is what makes those tools make sense later on.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lists: Python's Way of Holding More Than One Thing
&lt;/h2&gt;

&lt;p&gt;A list is an ordered collection of values, written inside square brackets:&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;transactions&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;1500&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;3000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;800&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;12000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;450&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2700&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;transactions&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;amount&lt;/span&gt;   &lt;span class="c1"&gt;# add each amount to the running total
&lt;/span&gt;    &lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Added Ksh&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;amount&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="s"&gt; — Running total: Ksh&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="si"&gt;}&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;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Added Ksh1500 — Running total: Ksh1500
Added Ksh3000 — Running total: Ksh4500
Added Ksh800 — Running total: Ksh5300
Added Ksh12000 — Running total: Ksh17300
Added Ksh450 — Running total: Ksh17750
Added Ksh2700 — Running total: Ksh20450
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You can also grab items by position (Python starts counting at 0):&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;passengers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Amina&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Brian&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Cynthia&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;David&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Esther&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;passengers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;    &lt;span class="c1"&gt;# Amina — the first passenger
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;passengers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;    &lt;span class="c1"&gt;# Cynthia — the third passenger (position 2)
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;passengers&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;])&lt;/span&gt;   &lt;span class="c1"&gt;# Esther — the last passenger
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Amina
Cynthia
Esther
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Position &lt;code&gt;0&lt;/code&gt; is always the first item not the second which trips up almost every beginner at least once. And &lt;code&gt;-1&lt;/code&gt; is a shortcut for "the last one," so you never have to count how long a list is just to grab its final item.&lt;/p&gt;

&lt;h2&gt;
  
  
  Functions: Package Your Logic So You Never Rewrite It
&lt;/h2&gt;

&lt;p&gt;A function is a named, reusable block of code. You define it once, then call it as many times as you need. Remember the grading logic from the conditionals section? Here's that exact idea, packaged into a function so you never have to retype it:&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="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;get_grade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;score&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;80&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Grade A - Excellent&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;70&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Grade B - Good&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;60&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Grade C - Average&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;elif&lt;/span&gt; &lt;span class="n"&gt;score&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Grade D - Below Average&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
    &lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Grade F - Failed&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;get_grade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;85&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# Grade A - Excellent
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;get_grade&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;42&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;   &lt;span class="c1"&gt;# Grade F - Failed
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Grade A - Excellent
Grade F - Failed
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The moment you find yourself copy-pasting the same five lines of grading logic into a second place, that's the signal to wrap it in a function instead. Now, no matter how many scores you need to grade, you call &lt;code&gt;get_grade()&lt;/code&gt; once instead of retyping the same &lt;code&gt;if&lt;/code&gt;/&lt;code&gt;elif&lt;/code&gt; chain over and over.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Modulus Operator: The Most Underrated Symbol in Python
&lt;/h2&gt;

&lt;p&gt;The modulus operator, written as &lt;code&gt;%&lt;/code&gt;, gives you the &lt;em&gt;remainder&lt;/em&gt; after division not the answer itself:&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="mi"&gt;10&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 1  (10 divided by 3 leaves a remainder of 1)
&lt;/span&gt;&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;15&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 0  (15 divides evenly by 5)
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1
0
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It looks like a small, obscure trick, but it solves a very common problem: figuring out whether a number is even or odd, or whether it divides evenly into groups.&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;numbers&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;12&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;7&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;5&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
&lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;
&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;number&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
        &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;count&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;count&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;   &lt;span class="c1"&gt;# 3 — there are three even numbers in the list
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;booking_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;47&lt;/span&gt;
&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;booking_id&lt;/span&gt; &lt;span class="o"&gt;%&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;==&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Even-numbered booking&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;else&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&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;Odd-numbered booking&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;&lt;strong&gt;Output:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Odd-numbered booking
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It also shows up when batching work for example, processing a big list of items in groups of 10 and needing to know exactly when you've hit the boundary of a new batch. It's a small tool, but it's one of those things you don't appreciate until the exact moment you need it and realize nothing else does the job as cleanly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Putting It All Together: A Simple Ticket Receipt
&lt;/h2&gt;

&lt;p&gt;Let's take some of the earliest blocks you laid down variables, &lt;code&gt;input()&lt;/code&gt;, &lt;code&gt;print()&lt;/code&gt;, f-strings, and basic arithmetic and use them to build something real: a mini program that prints out a bus ticket receipt.&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;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;             BUS TICKET BOOKING&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="n"&gt;passenger_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter passenger name: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;route&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter route: &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="n"&gt;fare&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;int&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;input&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Enter fare (ksh): &lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="n"&gt;booking_fee&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;span class="n"&gt;total&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;fare&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;booking_fee&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&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;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;            TICKET&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Passenger   : &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;passenger_name&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Route       : &lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;route&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Fare        : Ksh&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;fare&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Booking Fee : Ksh&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;booking_fee&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;-&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nf"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sa"&gt;f&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;TOTAL       : Ksh&lt;/span&gt;&lt;span class="si"&gt;{&lt;/span&gt;&lt;span class="n"&gt;total&lt;/span&gt;&lt;span class="si"&gt;}&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;             THANK YOU FOR BOOKING&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&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;=&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mi"&gt;40&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Output&lt;/strong&gt; (if the person enters "Josephine Mackylah", "Nairobi - Mombasa", and 1200)&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;========================================
             BUS TICKET BOOKING
========================================
Enter passenger name: Josephine Mackylah
Enter route: Nairobi - Mombasa
Enter fare (ksh): 1200

========================================
            TICKET
========================================
Passenger   : Josephine Mackylah
Route       : Nairobi - Mombasa
Fare        : Ksh1200
Booking Fee : Ksh10
----------------------------------------
TOTAL       : Ksh1210
========================================
             THANK YOU FOR BOOKING
========================================
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's more going on here than it looks like at first glance. Notice &lt;code&gt;"=" * 40&lt;/code&gt; that's Python repeating a character 40 times to draw a clean divider line, instead of you typing out forty equals signs by hand. It's a small trick, but it's the kind of shortcut that makes your output look intentional instead of thrown together.&lt;/p&gt;

&lt;p&gt;The program then uses &lt;code&gt;input()&lt;/code&gt; three times to collect the passenger's name, route, and fare turning a static script into something that actually responds to whoever's using it. Notice that the fare is wrapped in &lt;code&gt;int()&lt;/code&gt;: that's because &lt;code&gt;input()&lt;/code&gt; always hands back text, even if someone types a number, so we have to explicitly convert it before we can do math with it. Skip that step, and Python will refuse to add it to &lt;code&gt;booking_fee&lt;/code&gt; a perfect real-world example of the "Python cares about data types" rule from earlier.&lt;/p&gt;

&lt;p&gt;From there, it's just a variable holding a fixed fee, one line of arithmetic to calculate the total, and a series of f-strings to lay everything out neatly lining up the labels with spacing so the receipt actually looks like a receipt.&lt;/p&gt;

&lt;p&gt;Run it, and you get a clean, ticket-style printout from about a dozen lines of code. That's variables, data types, &lt;code&gt;input()&lt;/code&gt;, &lt;code&gt;print()&lt;/code&gt;, and f-strings five of the ten blocks you just learned all working together to produce something that genuinely feels useful.&lt;/p&gt;

&lt;p&gt;You don't have to master everything at once. Learn one block well, set it down properly, and place the next one on top. By the time you reach the last line of that receipt, you'll notice you're already using half the concepts you just learned without even having to think about it.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>python</category>
      <category>basic</category>
      <category>programming</category>
    </item>
    <item>
      <title>SQL Taught Me That There Is Always an Easier Way to Do Things</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Wed, 26 Aug 2026 09:10:01 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/sql-taught-me-that-there-is-always-an-easier-way-to-do-things-37lh</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/sql-taught-me-that-there-is-always-an-easier-way-to-do-things-37lh</guid>
      <description>&lt;p&gt;There is a particular kind of fatigue that only a data analyst knows. It is not simply the result of long hours, but the mental exhaustion of manually reviewing thousands of rows to find a single error, such as a misspelled category or inconsistent entry. This is where inefficient processes can become more draining than the work itself.&lt;/p&gt;

&lt;p&gt;If you have experienced this, you already know where this is heading. If you have not, keep reading it may help you avoid hundreds of hours of unnecessary manual work.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Manual Times
&lt;/h2&gt;

&lt;p&gt;For a long time, my approach to data was largely based on trial and error. I collected the data, reviewed it manually, and spent significant time restructuring it. Filtering meant working through dropdowns one column at a time, cleaning involved manually scanning thousands of rows for errors and duplicates, and aggregation often depended on complex formulas that could easily break when the dataset changed.&lt;/p&gt;

&lt;p&gt;I became proficient at working with messy datasets, to the point where people trusted me with the ones others avoided. However, being good at a manual process does not mean it is the most efficient approach. For years, I knew I was capable of handling the work, but I also knew there had to be a better way.&lt;/p&gt;

&lt;p&gt;The truth is, I didn't feel the weight of that manual process until I compared it to what came after. You don't always know you're carrying something heavy until someone hands you a lighter version of the same load.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Moment SQL Stopped Being Intimidating
&lt;/h2&gt;

&lt;p&gt;I remember the first time I wrote a SQL query that solved a real problem. It was not perfect, but it returned exactly the records I needed, using three conditions that would have taken me nearly an hour to apply manually. The query did it in less than a second.&lt;/p&gt;

&lt;p&gt;That was the moment I realized: I had been doing things the hard way.&lt;/p&gt;

&lt;p&gt;That moment changed how I approached data. Instead of spending hours clicking through spreadsheets, I began opening the SQL editor and focusing on one question: What do I actually want to know? SQL handled the process of getting me there, allowing me to focus less on the mechanics and more on the insight.&lt;/p&gt;

&lt;h2&gt;
  
  
  Let Me Show You What I Mean
&lt;/h2&gt;

&lt;p&gt;So let me walk you through a real kind of dataset I work with, a Tembo hotel booking records: booking_id, guest&lt;br&gt;
_name, guest_phone, guest_city, guest_nationality, room_no, room _type, room_rate_per_night, check-in and check-out dates, payment method, staff_name, staff_department, staff_salary, booking_status,total_amount, service_used and guest_rating. &lt;br&gt;
A few thousand rows collected over months and entered by different people will inevitably contain inconsistencies. If you work with operational data, you know that real-world datasets are rarely clean they are messy in ordinary but time consuming ways.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Cleaning thousands of records that used to take a full day now took a few well-written lines: standardizing inconsistent entries, catching nulls, flagging duplicates, all in one pass, all repeatable.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Filtering was no longer a scavenger hunt through dropdown menus. A &lt;code&gt;WHERE&lt;/code&gt; clause could isolate exactly the records I needed, out of tens of thousands, instantly, and I could refine it as many times as I wanted without starting over.&lt;br&gt;
&lt;/p&gt;&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="c1"&gt;--cleaning guest_name&lt;/span&gt;
&lt;span class="k"&gt;update&lt;/span&gt; &lt;span class="n"&gt;tembo_hotel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tembo_hotel_staging&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;guest_name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;initcap&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;trim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;guest_name&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;guest_name&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="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;Aggregating stopped being a fragile web of formulas. &lt;code&gt;GROUP BY&lt;/code&gt; and a handful of aggregate functions gave me summaries, totals, and averages that didn't break the moment the dataset grew.
&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;room_type&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="o"&gt;*&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;total_bookings&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tembo_hotel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tembo_hotel_staging&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;room_type&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;total_bookings&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;ul&gt;
&lt;li&gt;Transforming data, joining tables, reshaping records, building the exact structure a report needed, became a conversation with the data instead of a fight against it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The work didn't get less important. It got less exhausting. And that distinction matters more than people admit.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cleaning.&lt;/strong&gt; The "Status" column should have four tidy values: Checked Out, Cancelled, No Show. Instead, some rows say "Checked Out" and others say "checked out," entered by someone in a hurry who didn't hit Shift. On a spreadsheet, you'd catch some of these with a filter, miss others, and never really be sure you got them all. In SQL, it's one statement:&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;update&lt;/span&gt; &lt;span class="n"&gt;tembo_hotel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tembo_hotel_staging&lt;/span&gt;
&lt;span class="k"&gt;set&lt;/span&gt; &lt;span class="n"&gt;booking_status&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'Checked Out'&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="k"&gt;lower&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;status&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s1"&gt;'checked out'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Every inconsistent entry, fixed, in one pass, no matter how many thousand rows are hiding behind it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Filtering.&lt;/strong&gt; Buried in the same dataset are a couple of bookings where the check-out date is recorded as earlier than the check-in date, a guest who apparently left two days before they arrived. Nobody enters that on purpose. It's a typo, a swapped date field, a rushed front-desk moment. On paper, or in a spreadsheet with a few thousand rows, that kind of error can sit there for months, quietly making your average length-of-stay figures wrong. A single filter surfaces it immediately:&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;booking_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;guest_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;check_in_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;check_out_date&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt; &lt;span class="n"&gt;tembo_hotel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tembo_hotel_staging&lt;/span&gt;
&lt;span class="k"&gt;WHERE&lt;/span&gt; &lt;span class="n"&gt;check_out_date&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="n"&gt;check_in_date&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That query doesn't just find an error. It hands you a punch list, exactly which bookings to go back and fix, by name.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Transforming.&lt;/strong&gt; The dataset also has a "Nights" column, filled in by hand, that's supposed to match the gap between check-in and check-out. Most of the time it does. But every so often you'll find a booking where the dates span two months and the nights column still says "2," because someone typed the wrong check-out date and the nights field was never recalculated. Instead of eyeballing every row to catch that, you let SQL do the comparison for you:&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;booking_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;guest_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;check_in_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;check_out_date&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="n"&gt;nights&lt;/span&gt; &lt;span class="k"&gt;as&lt;/span&gt; &lt;span class="n"&gt;recorded_nights&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
       &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;check_out_date&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;check_in_date&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;actual_nights&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tembo_hotel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tembo_hotel_staging&lt;/span&gt;
&lt;span class="k"&gt;where&lt;/span&gt; &lt;span class="n"&gt;nights&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;check_out_date&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;check_in_date&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One query, and every mismatch between what was recorded and what actually happened is sitting right in front of you.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Aggregating.&lt;/strong&gt; And then there's the question every manager eventually asks: which room type is actually making the money? Doing that by hand means sorting, subtotaling, and re-checking a pivot table every time new bookings come in, and hoping nobody left an amount field blank, because a blank cell breaks a SUM formula fast. SQL handles the gaps for you and gives you the answer in seconds:&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;room_type&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="o"&gt;*&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;total_bookings&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="k"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;total_amount&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;total_revenue&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="n"&gt;round&lt;/span&gt;&lt;span class="p"&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;total_amount&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt; &lt;span class="mi"&gt;2&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;avg_booking_value&lt;/span&gt;
&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;tembo_hotel&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;tembo_hotel_staging&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;room_type&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;total_revenue&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;h2&gt;
  
  
  What It Actually Changed
&lt;/h2&gt;

&lt;p&gt;Learning SQL after years of doing things manually teaches you that it does more than save time it gives you back your attention. By reducing the mental effort spent on repetitive tasks, you have more capacity to focus on the data, identify meaningful patterns, and uncover insights that manual processes can easily hide.&lt;/p&gt;

&lt;p&gt;SQL also changed how I viewed mistakes. Manual errors could easily go unnoticed until they were identified downstream, while queries could be tested, rerun, and corrected quickly. My confidence in my work increased not because I became more careful, but because SQL made accuracy and consistency easier to achieve.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Bigger Lesson
&lt;/h2&gt;

&lt;p&gt;If I'm honest, this isn't really an article about SQL. Not entirely.&lt;/p&gt;

&lt;p&gt;It is about realizing that doing something the hard way is not a badge of honor, it simply means you have not yet discovered a better approach. For me, SQL was that turning point. For anyone doing repetitive, high-volume work, there is likely a more efficient tool, shortcut, or way of approaching the problem waiting to be discovered.&lt;/p&gt;

&lt;p&gt;If you are still relying on manual filters and checking rows one by one to find errors, you are not slow or behind you simply have not found the more efficient approach yet. Once you discover it, you will not only work faster but also think more clearly, with less energy spent on repetitive tasks.&lt;/p&gt;

&lt;p&gt;That's what SQL taught me. Not just how to write a query. How to keep asking, every time something feels unnecessarily hard: is there an easier way to do this?&lt;/p&gt;

&lt;p&gt;There usually is a simpler, more efficient way to approach the problem.&lt;/p&gt;

</description>
      <category>basic</category>
      <category>sql</category>
      <category>analytics</category>
      <category>luxdev</category>
    </item>
    <item>
      <title>From Local to Cloud: Lessons I Learned Connecting Power BI to SQL Databases</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Tue, 14 Jul 2026 15:38:02 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/from-local-to-cloud-lessons-i-learned-connecting-power-bi-to-sql-databases-3ipp</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/from-local-to-cloud-lessons-i-learned-connecting-power-bi-to-sql-databases-3ipp</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff798yegz8u9on7o1n6ld.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Ff798yegz8u9on7o1n6ld.png" alt=" " width="799" height="445"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Introduction.
&lt;/h1&gt;

&lt;p&gt;Data is only as valuable as the insights it provides. Before creating dashboards or writing DAX measures in Power BI, you must first establish a secure connection to your data source. In today's environments, that often means connecting to both on premises SQL Servers and cloud hosted databases, each with its own security requirements. This guide walks you through securely connecting Power BI Desktop to local and cloud SQL databases, including configuring SSL certificates for cloud connections.&lt;/p&gt;

&lt;h2&gt;
  
  
  Understanding Data Connectivity Modes.
&lt;/h2&gt;

&lt;p&gt;Before building dashboards in Power BI, I learnt that the most important decisions is choosing how Power BI will connect and interact with my SQL database.&lt;br&gt;
Power BI mainly provides two connectivity modes:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Import Mode&lt;/em&gt; loads a snapshot of your SQL data into Power BI’s memory. This delivers fast performance and allows you to take full advantage of Power BI’s data modeling and DAX capabilities. However, because the data is stored as a snapshot, regular refreshes are required to keep reports updated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;em&gt;Direct Query&lt;/em&gt; keeps the data within the SQL database and sends live queries whenever users interact with a report. This is useful for very large datasets or situations requiring frequent updates. However, performance depends heavily on the capacity and speed of the underlying database.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Connecting Power BI to a Local SQL Database
&lt;/h2&gt;

&lt;p&gt;When working with a local SQL database, the connection process is usually straightforward because the data environment is within your machine. Before connecting, ensure you have the SQL Server details, database access permissions, and the appropriate authentication credentials.&lt;/p&gt;

&lt;h2&gt;
  
  
  Gathering Your Database Connection Details
&lt;/h2&gt;

&lt;p&gt;Before connecting Power BI to SQL database, collect the key connection details from the database management tool (such as &lt;code&gt;SSMS&lt;/code&gt; or &lt;code&gt;pgAdmin&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;You will need:&lt;br&gt;
Server Name: The location or address of your database server (for example, &lt;code&gt;localhost&lt;/code&gt;, or an internal network address).&lt;br&gt;
Database Name: The specific database containing the tables you want to analyze.&lt;br&gt;
Authentication Method: The credentials required to access the database, such as Windows/Active Directory authentication or a database username and password.&lt;/p&gt;

&lt;h2&gt;
  
  
  Initializing the Database Connection
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;To begin connecting Power BI to a database, open Power BI Desktop and navigate to the Home tab.&lt;/li&gt;
&lt;li&gt;Select Get Data, choose More to explore available data sources, then search for a database type (such as &lt;code&gt;SQL Server&lt;/code&gt; or &lt;code&gt;PostgreSQL&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select the appropriate connector and click Connect to start the setup process.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcwbo4mo7btatge7p7qsh.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fcwbo4mo7btatge7p7qsh.png" alt=" " width="799" height="413"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the database setup window, enter a Server pathway and a Database name.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Select Import and then Click OK.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fglxss6obm9j4cjp2apqm.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fglxss6obm9j4cjp2apqm.png" alt=" " width="799" height="378"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Authenticate and Load Your Data
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;A credential prompt will appear. If a database utilizes corporate single sign-on, select Windows -&amp;gt; Use my current credentials. For dedicated SQL logins, select the Database tab and manually type a database user credentials.&lt;/li&gt;
&lt;li&gt;Click Connect. If prompted with an unencrypted connection warning, click OK or Run (safe for internal testing environments).&lt;/li&gt;
&lt;li&gt;The Navigator window will open. Check the boxes next to the tables you wish to pull, and click Load to commit them to a workspace.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Connecting Power BI to a Cloud SQL Database (Aiven)
&lt;/h2&gt;

&lt;p&gt;Cloud databases such as Aiven PostgreSQL provide scalability and flexibility, but connecting to them requires additional security considerations. Since these databases are accessed over the internet, they rely on encrypted connections to protect data during transmission.&lt;br&gt;
Power BI requires a trusted and secure connection before accessing cloud databases. This means a local machine must recognize and trust the cloud provider’s Certificate Authority (CA) to verify the database server’s identity and establish a secure connection.&lt;/p&gt;

&lt;h2&gt;
  
  
  Extract Connection Properties from Aiven
&lt;/h2&gt;

&lt;p&gt;Step 1: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Download the CA Certificate, Look near the bottom of your image in the Connection information block. Locate the row labeled CA certificate.&lt;/li&gt;
&lt;li&gt;Click the small Download icon (the arrow pointing down into a tray) located on the far-right side of that row.&lt;/li&gt;
&lt;li&gt;Save the file to a secure folder on your computer (it will be downloaded as a file typically named ca.pem).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F21j8xuuznv7khs3xk7qz.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F21j8xuuznv7khs3xk7qz.png" alt=" " width="800" height="342"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Download and Convert the SSL Certificate
&lt;/h2&gt;

&lt;p&gt;Step 2: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Unhide and Copy the Database Credentials. You will also need the correct login credentials shown on this screen to fix the password error from your earlier.&lt;/li&gt;
&lt;li&gt;Click the Eye icon next to the asterisks in the Password row to reveal your actual password. Copy it.&lt;/li&gt;
&lt;li&gt;Note the User listed right above it is avnadmin (not postgres like you had earlier).Note the custom Port is 14306 (not 5432).&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmm3kh0onjyao7mrfob47.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fmm3kh0onjyao7mrfob47.png" alt=" " width="800" height="411"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a prerequisite, confirm that the PostgreSQL database is available by connecting to it through DBeaver before attempting to connect with Power BI.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy91w5doz4hm653gqozbr.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fy91w5doz4hm653gqozbr.png" alt=" " width="800" height="456"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Select the dataset you want to import. If your data has already been loaded into the PostgreSQL database, click Load to import the data into Power BI Desktop, and then proceed with data cleaning, data modeling, and dashboarding.&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzuymonvygf4v5qx7robx.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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fzuymonvygf4v5qx7robx.png" alt=" " width="723" height="413"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Use the troubleshooting below to identify common connection errors, understand their causes, and implement the appropriate solution.
&lt;/h3&gt;

&lt;p&gt;1&lt;code&gt;. Error Message / Symptom&lt;br&gt;
The remote certificate is invalid according to the validation procedure."&lt;br&gt;
Root Cause Analysis&lt;br&gt;
The Aiven SSL certificate was installed under the Current User certificate store, or it was not registered correctly with the system&lt;br&gt;
Corrective Action&lt;br&gt;
Re-run Phase 2, Step 2.3. Ensure you install the certificate under Local Machine and place it in the Trusted Root Certification Authorities store.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;2.Error Message / Symptom&lt;br&gt;
Connection Timeout or "Unable to connect to the remote server"&lt;br&gt;
Root Cause Analysis&lt;br&gt;
A local or corporate firewall is blocking outbound network traffic on Aiven's assigned port.&lt;br&gt;
Corrective Action&lt;br&gt;
Contact your network administrator or IT department to whitelist the outbound traffic for your specific Aiven port, as cloud databases typically use non-standard ports.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;3. Error Message / Symptom&lt;br&gt;
An error occurred while reading data from the provider: 'Invalid password&lt;br&gt;
Root Cause Analysis&lt;br&gt;
Incorrect login credentials or cached credentials stored in Power BI's credential manager.&lt;br&gt;
Corrective Action&lt;br&gt;
In Power BI Desktop, go to File →Options and settings → Data source settings. Select your database connection, click Clear Permissions, and reconnect using your correct cloud database credentials.&lt;/code&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Final Thoughts and Key Takeaways
&lt;/h3&gt;

&lt;p&gt;-It is easy to get frustrated when a connection gets blocked, but cloud environments like Aiven enforce strict SSL encryption for a reason to keep your data safe. Once you know how to navigate the handshake, it becomes a routine setup rather than a roadblock.&lt;/p&gt;

&lt;p&gt;-Remember that Power BI doesn't validate certificates on its own it relies entirely on your local Windows operating system. If you take the extra ten seconds to correctly drop your certificate into the Local Machine's Trusted Root folder, Windows handles the trust automatically behind the scenes.&lt;/p&gt;

&lt;p&gt;-The best part about this configuration is that it is a one-time task. Once that secure pipeline is locked in place, you can completely forget about ports and protocols and put 100% of your focus where it belongs: writing clean DAX and designing impactful dashboards.&lt;/p&gt;

</description>
      <category>programming</category>
      <category>powerbi</category>
      <category>postgressql</category>
      <category>database</category>
    </item>
    <item>
      <title>The First Thing Power BI Taught Me Had Nothing to Do with Dashboards</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Sun, 28 Jun 2026 22:22:11 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/the-first-thing-power-bi-taught-me-had-nothing-to-do-with-dashboards-1h11</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/the-first-thing-power-bi-taught-me-had-nothing-to-do-with-dashboards-1h11</guid>
      <description>&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxvcfgo2mi59iis03kpga.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fxvcfgo2mi59iis03kpga.jpeg" alt=" " width="777" height="431"&gt;&lt;/a&gt;&lt;br&gt;
When I decided to learn Power BI, I had one picture in my mind, beautiful dashboards.&lt;br&gt;
I imagined creating interactive reports with colorful charts, KPIs, and slicers that would impress anyone who looked at them. Like many beginners, I thought the magic of Power BI started with visualization.&lt;br&gt;
I couldn't have been more wrong.&lt;br&gt;
The first thing Power BI taught me had nothing to do with dashboards.&lt;br&gt;
It taught me that before you can tell a story with data, you must first clean the data.&lt;/p&gt;
&lt;h2&gt;
  
  
  My First Surprise
&lt;/h2&gt;

&lt;p&gt;On my very first day, I expected to import data and immediately start building charts. I imagined dashboards coming together within minutes.&lt;br&gt;
Instead, I found myself spending most of my time in Power Query, cleaning and preparing the data before I could do anything visual.&lt;br&gt;
At first, I was confused. I kept asking myself: "Why am I spending so much time cleaning data? I thought Power BI was about building dashboards."&lt;br&gt;
But when I looked more closely at the dataset, everything started to make sense.&lt;br&gt;
I noticed something simple, yet very important.&lt;br&gt;
Some names that were meant to represent the same person were written in different ways:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- Josephine
- josephine
- JOSEPHINE
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;To a person, these are clearly the same name.&lt;br&gt;
But to Power BI, they are treated as three completely different values.&lt;/p&gt;

&lt;p&gt;I also discovered several data quality issues that I hadn’t expected.&lt;br&gt;
There were empty cells where important information was missing, and some text columns had things like errors, null and N/A, which I had to standardize by replacing them with consistent values such as &lt;code&gt;Unknown&lt;/code&gt;, &lt;code&gt;Not Provided&lt;/code&gt;, depending on the context and data type. For example, I used &lt;code&gt;Unknown&lt;/code&gt; or &lt;code&gt;Not Provided&lt;/code&gt; for text fields, and handled numeric fields differently by replacing error cells with &lt;code&gt;null&lt;/code&gt; since Power BI recognizes null as a special value that represents missing or undefined datas to ensure they remained valid for calculations.&lt;/p&gt;

&lt;p&gt;I also encountered duplicate records, which inflated totals and could easily lead to misleading results if not corrected.&lt;br&gt;
Again, some dates &lt;code&gt;01/02/2026&lt;/code&gt; were stored as text instead of proper date formats, making it impossible to perform time-based analysis until they were converted correctly and also IDs were treated as numbers when they should be text.&lt;/p&gt;

&lt;p&gt;I found extra spaces and inconsistent formatting, which made identical values appear different and affected grouping and filtering. For example, &lt;code&gt;"Uganda"&lt;/code&gt; vs &lt;code&gt;"Uganda "&lt;/code&gt; You can say Some values looked identical but weren’t—hidden spaces made Power BI treat them as different entries.&lt;br&gt;
I also realized that the dataset had incorrect data types, where text, numeric, and date fields were not properly assigned. This meant some columns that should have supported calculations were treated as plain text, while others that should have been categorical or date-based were misinterpreted, affecting accuracy and performance.&lt;/p&gt;
&lt;h2&gt;
  
  
  Then Came My Next Challenge: DAX
&lt;/h2&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9nt0vcpe2qareib0rwlx.jpeg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F9nt0vcpe2qareib0rwlx.jpeg" alt=" " width="799" height="399"&gt;&lt;/a&gt;&lt;br&gt;
After spending time cleaning and preparing the data, I thought I was finally ready to build visuals.&lt;br&gt;
But Power BI had another lesson waiting for me. This is where I met something called DAX (Data Analysis Expressions).&lt;br&gt;
At first, it looked simple just formulas, right? I quickly realized it was not that simple.&lt;br&gt;
DAX wasn’t just about writing calculations. It was about thinking in logic and asking the right questions of my data.&lt;/p&gt;

&lt;p&gt;Instead of just “adding numbers,” I had to start thinking like an analyst:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- What is the total cost of production?
- What is the total profit value?
- What is the total revenue?
- What is the total planted area?
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Suddenly, I wasn’t just clicking around Power BI anymore, I was reasoning with data.&lt;/p&gt;

&lt;h2&gt;
  
  
  My First DAX Moments
&lt;/h2&gt;

&lt;p&gt;My first simple functions felt like a breakthrough:&lt;br&gt;
&lt;code&gt;SUM()&lt;/code&gt; to calculate totals&lt;br&gt;
&lt;code&gt;AVERAGE()&lt;/code&gt; to find mean values&lt;br&gt;
&lt;code&gt;COUNT()&lt;/code&gt; and &lt;code&gt;DISTINCTCOUNT()&lt;/code&gt; to understand records&lt;br&gt;
Even though they looked basic, they opened a new way of thinking.&lt;br&gt;
I remember realizing something important:&lt;br&gt;
Cleaning data prepares it.&lt;br&gt;
DAX gives it meaning.&lt;/p&gt;

&lt;h2&gt;
  
  
  My First Encounter with Logical Functions in DAX
&lt;/h2&gt;

&lt;p&gt;This is where Power BI started to feel less like a tool and more like a way of thinking.&lt;br&gt;
Logical functions are what allow Power BI to make decisions based on conditions. Instead of just calculating values, I could now tell Power BI:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;- “If this condition is true, do this…”&lt;/code&gt;&lt;br&gt;
&lt;code&gt;- “If not, do something else…”&lt;/code&gt;&lt;br&gt;
The first logical function I used was &lt;code&gt;IF()&lt;/code&gt;.&lt;br&gt;
It helped me answer simple questions like:&lt;br&gt;
If a value is above 50, return “Pass”&lt;br&gt;
Otherwise, return “Fail”&lt;br&gt;
&lt;code&gt;Result = IF([Score] &amp;gt;= 50, "Pass", "Fail")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Then things got more interesting with &lt;code&gt;nestedIFs&lt;/code&gt;.&lt;br&gt;
Instead of just two outcomes, I could handle multiple categories and also take care of the blanks:&lt;br&gt;
&lt;code&gt;Excellent&lt;br&gt;
Good&lt;br&gt;
Average&lt;br&gt;
Poor&lt;/code&gt;&lt;br&gt;
Forexample;&lt;br&gt;
&lt;code&gt;Grade =IF([Score] &amp;gt;= 80, "Excellent",IF([Score] &amp;gt;= 60, "Good",IF([Score] &amp;gt;= 50, "Average", "Poor")&lt;/code&gt; At this point, I realized&lt;/p&gt;

&lt;p&gt;Data analysis is often about classification, not just numbers.&lt;/p&gt;

&lt;p&gt;One of the biggest challenges I faced was missing data.&lt;br&gt;
That’s where &lt;code&gt;ISBLANK()&lt;/code&gt; came in handy.&lt;br&gt;
Example:&lt;br&gt;
Revenue Category Nested IF =&lt;code&gt;IF(ISBLANK('Kenya_Crops_Dataset'[Revenue (KES)]),"Not Provided",IF('Kenya_Crops_Dataset'[Revenue (KES)] &amp;gt; 500000,"High Revenue",IF('Kenya_Crops_Dataset'[Revenue (KES)] &amp;gt; 100000,&lt;br&gt;
 "Medium Revenue",IF('Kenya_Crops_Dataset'[Revenue (KES)] &amp;gt; 0,"Low Revenue","Not Provided"))))&lt;/code&gt;&lt;br&gt;
This helped me handle empty values instead of ignoring them.&lt;br&gt;
I learned that missing data is still data you just need to label it properly.&lt;/p&gt;

&lt;p&gt;Sometimes one condition was not enough. So I learned how to combine conditions: &lt;code&gt;AND/OR&lt;/code&gt; Example:&lt;br&gt;
&lt;code&gt;High Revenue and Profitable =IF(AND('Kenya_Crops_Dataset'[Revenue (KES)] &amp;gt; 100000,'Kenya_Crops_Dataset'[Profit (KES)] &amp;gt; 0),"High Revenu Profitable Farm","Other Farm")&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Maize or Rice =&lt;br&gt;
IF(OR('Kenya_Crops_Dataset'[Crop Type]"Maize",'Kenya_Crops_Dataset'[Crop Type] = "Rice"),"Priority Crop","Other Crop")&lt;br&gt;
&lt;/code&gt;&lt;br&gt;
I realized something that Logical functions don’t just process data they simulate thinking and they made me think like an analyst, not just a tool user.&lt;/p&gt;

&lt;h2&gt;
  
  
  This is just the begining
&lt;/h2&gt;

&lt;p&gt;As I look back at my first steps in Power BI, I realize something important.&lt;br&gt;
I didn’t start by building dashboards. I started by cleaning messy data, fixing inconsistencies, and learning how to think logically about information.&lt;br&gt;
Then came DAX where numbers stopped being just numbers and started becoming decisions. And finally, logical functions taught me that data is not just something you display, but something you interpret.&lt;br&gt;
What I thought would be a journey about visuals turned out to be a journey about thinking.&lt;br&gt;
And I am still at the beginning. Every dataset I touch now reminds me of one thing, before insights, there is understanding. Before understanding, there is preparation.&lt;br&gt;
Power BI is not just teaching me how to analyze data it is teaching me how to see it differently.&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>powerbi</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How Excel is Used in Real-World Data Analysis.</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Sun, 28 Jun 2026 19:12:51 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/how-excel-is-used-in-real-world-data-analysis-1pom</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/how-excel-is-used-in-real-world-data-analysis-1pom</guid>
      <description>&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%2Febr2fr0h34u090lj3q1v.jpg" 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%2Febr2fr0h34u090lj3q1v.jpg" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before dashboards light up with insights, before SQL queries pull records from databases, and before machine learning models make predictions, most data begins its journey in a spreadsheet. For decades, Microsoft Excel has been the tool that professionals rely on to collect, organize, clean, and analyze information. From tracking hospital records and managing business sales to monitoring project performance and preparing reports, Excel remains one of the most widely used tools in the world of data analysis.&lt;br&gt;
As I began my journey in Data Science and Analytics, I quickly realized that Excel is far more than a simple spreadsheet application. It is often the first place where raw data is transformed into meaningful information. In this article, I explore how Excel is used in real-world data analysis and what I have learnt this week.&lt;/p&gt;
&lt;h3&gt;
  
  
  What is Excel?
&lt;/h3&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application that organises data into rows and columns inside a grid called a worksheet. Each cell in that grid can hold text, numbers, dates, or crucially, formulas that compute values dynamically based on other cells.&lt;/p&gt;
&lt;h3&gt;
  
  
  Understanding Excel's Building Blocks
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;A workbook is the entire Excel file that contains one or more worksheets. Think of it as a digital binder used to store related data and analyses in a single file.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A worksheet, commonly called a sheet, is an individual page within a workbook where data is entered and managed. A workbook can contain multiple worksheets for organizing different sets of information.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A row is a horizontal line of cells identified by numbers (1, 2, 3, and so on). Rows are typically used to store individual records or observations. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A column is a vertical line of cells identified by letters (A, B, C, and so on). Columns are usually used to store specific categories or variables of data.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A cell is the intersection of a row and a column. It is the smallest unit in a worksheet and serves as the location where data is entered. Each cell has a unique reference, such as A1 or B5.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A range is a group of two or more cells selected together. Ranges are commonly used when performing calculations, formatting data, or applying formulas. For example, A1 represents a range containing multiple rows and columns.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h4&gt;
  
  
  A Critical Step in Analysis that i learnt is Data cleaning.
&lt;/h4&gt;

&lt;p&gt;One of the most valuable lessons I learned during my first week with Excel is that the quality of an analysis depends heavily on the quality of the data being analyzed. Even the most advanced analytical techniques can produce misleading results if the underlying data is inaccurate or incomplete.&lt;/p&gt;

&lt;p&gt;In real-world scenarios, datasets often contain duplicate records, missing values, inconsistent formatting, extra spaces, and incorrect entries. These issues can lead to errors in calculations, inaccurate reports, and poor decision-making.&lt;/p&gt;

&lt;p&gt;Excel provides several tools that help address these challenges, including Remove Duplicates, text functions such as TRIM() and PROPER(), and data validation features that improve data accuracy and consistency. By cleaning and preparing data before analysis, analysts can ensure that their findings are reliable and meaningful.&lt;/p&gt;
&lt;h4&gt;
  
  
  Function Purpose Examples I learnt.
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPPER() Converts text to uppercase =UPPER("jose") → JOSE
LOWER() Converts text to lowercase =LOWER("JOSE") → jose
PROPER() Capitalizes first letter of each
word =PROPER("jose macky") → Jose Macky
TRIM() Removes extra spaces from
text =TRIM(" Jose Macky ") → Jose Macky
LEFT() Extracts leftmost characters =LEFT("Jose", 2) → Jo
RIGHT() Extracts rightmost characters =RIGHT("Jose", 2) → hn
MID() Extracts characters from the
middle =MID("Jose", 2, 2) → oh
LEN() Returns length of text =LEN("Jose") → 4
FIND() Finds position of a substring
(case-sensitive) =FIND("o", "Jose") → 3
SUBSTITUTE() Replaces text within a string
=SUBSTITUTE("Jose Macky", "Macky",
"Smith") → Jose Smith

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

&lt;/div&gt;

&lt;h4&gt;
  
  
  I also learnt Why Excel Matters in Data Analysis
&lt;/h4&gt;

&lt;p&gt;Data analysis is about turning raw data into meaningful insights that support better decision-making. However, before any patterns can be identified or trends discovered, data must first be collected, organized, and prepared. This is where Excel plays a crucial role.&lt;/p&gt;

&lt;p&gt;Excel serves as the foundation for many data analysis workflows because it provides a simple yet powerful environment for managing data. It enables users to organize information into structured tables, perform calculations automatically, clean and validate datasets, and quickly sort or filter records to focus on relevant information. These capabilities allow analysts to transform raw data into accurate, reliable, and actionable insights.&lt;/p&gt;

&lt;p&gt;Whether tracking sales performance, managing patient records, analyzing survey responses, or monitoring project indicators, Excel remains one of the most widely used tools for preparing data for analysis and informed decision-making.&lt;/p&gt;
&lt;h4&gt;
  
  
  Organizing Data for Better Insights
&lt;/h4&gt;

&lt;p&gt;A key takeaway from my first week of learning Excel is that effective data analysis begins with proper data organization. Excel structures information into rows and columns, creating datasets that are easy to understand, manage, and analyze.&lt;br&gt;
For example, a retail company might use Excel to record and organize sales transactions as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;Product&lt;/span&gt;     &lt;span class="k"&gt;Quantity&lt;/span&gt; &lt;span class="k"&gt;Sold&lt;/span&gt;   &lt;span class="k"&gt;Unit&lt;/span&gt; &lt;span class="k"&gt;Price&lt;/span&gt;   &lt;span class="k"&gt;Sales&lt;/span&gt; &lt;span class="k"&gt;Date&lt;/span&gt;
&lt;span class="k"&gt;Laptop&lt;/span&gt;             &lt;span class="mf"&gt;10&lt;/span&gt;           &lt;span class="nv"&gt;$500&lt;/span&gt;          &lt;span class="ld"&gt;01/06/2026&lt;/span&gt;
&lt;span class="k"&gt;Mouse&lt;/span&gt;              &lt;span class="mf"&gt;25&lt;/span&gt;           &lt;span class="nv"&gt;$15&lt;/span&gt;        &lt;span class="ld"&gt;02/06/2026&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;With data organized in this format, it becomes much easier to calculate revenue, identify best selling products, track sales trends over time, and generate reports that support business decision-making. This demonstrates how Excel's structured layout transforms raw data into information that can be analyzed effectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  Sorting and Filtering for Better Insights
&lt;/h4&gt;

&lt;p&gt;As datasets grow larger, finding specific information manually becomes increasingly difficult and time consuming. This is where Excel's sorting and filtering features become valuable tools for data analysis.&lt;/p&gt;

&lt;p&gt;Sorting allows users to arrange data in a meaningful order, such as ranking student scores from highest to lowest or organizing products by price. Filtering, on the other hand, enables users to display only the records that meet specific criteria while temporarily hiding the rest.&lt;/p&gt;

&lt;p&gt;For example, a school administrator can sort examination scores to quickly identify top-performing students, while a sales manager can filter transactions to view sales from a particular region or month. These features make it easier to explore data, identify trends, and focus on relevant information without modifying the original dataset.&lt;/p&gt;

&lt;p&gt;Using Formulas and Functions to Automate Analysis&lt;/p&gt;

&lt;p&gt;One of Excel’s most powerful capabilities is its ability to automate calculations using formulas. Instead of relying on manual calculations or external tools, Excel allows users to build dynamic formulas that automatically update whenever the underlying data changes.&lt;/p&gt;

&lt;p&gt;This makes it especially useful in real-world scenarios such as calculating monthly expenses, determining employee salaries, computing student performance averages, or estimating project costs. For example, a simple formula like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;=A1+B1&lt;/code&gt;&lt;br&gt;
adds the values in two cells and instantly updates the result whenever either value changes. This dynamic behavior reduces manual effort and minimizes the risk of errors.&lt;/p&gt;

&lt;p&gt;Beyond basic formulas, Excel also provides built-in functions that simplify and speed up data analysis.&lt;/p&gt;

&lt;p&gt;Some of the most commonly used functions include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SUM() – Adds a range of values
Example: =SUM(B2)
AVERAGE() – Calculates the mean of a dataset
Example: =AVERAGE(B2)
MAX() – Returns the highest value in a range
Example: =MAX(B2)
MIN() – Returns the lowest value in a range
Example: =MIN(B2)
COUNT() – Counts the number of numeric entries in a range
Example: =COUNT(B2)

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

&lt;/div&gt;



&lt;p&gt;These functions are widely used in data analysis to quickly summarize large datasets and uncover key trends. They help analysts move from raw numbers to meaningful insights in a matter of seconds.&lt;/p&gt;

&lt;h4&gt;
  
  
  Real-World Applications of Excel in Different Industries
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the business and sales sector, companies use Excel to track sales performance, monitor inventory levels, analyze customer trends, and prepare financial reports. These activities help organizations understand their performance and make informed decisions that improve efficiency and profitability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In healthcare, Excel plays an important role in managing and analyzing data. Hospitals and health programs use it to track patient information, monitor disease trends, generate monthly reports, and support monitoring and evaluation activities. This helps health professionals maintain accurate records and improve service delivery.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In education, schools and academic institutions rely on Excel to record student performance, calculate grades, track attendance, and generate academic reports. This simplifies administrative work and ensures that student data is well-organized and easy to access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the agriculture sector, Excel is used to monitor crop yields, analyze farmer productivity, track training attendance, and manage project performance indicators. These insights help agricultural organizations improve planning and support farmers more effectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In monitoring and evaluation, Excel is a key tool for data management and reporting. It is used to clean survey datasets, calculate indicators, track project progress, and produce donor reports. This ensures that program data is accurate, consistent, and useful for decision making.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Personal Reflection.
&lt;/h4&gt;

&lt;p&gt;Before learning Excel, I viewed data as something abstract—hidden inside systems and far removed from everyday understanding. After working with Excel, that perception changed. Data became something tangible, something I could explore, manipulate, and question directly.&lt;/p&gt;

&lt;p&gt;As I began to use Excel more deeply, I realized that data is not just passive information sitting in a system. It is something that can be explored and interrogated. Even simple analyses, such as using a SUMIFS formula to answer a question like how many projects in Berlin, handled by employees above 30 years, were completed, helped me see data in a new light. It became clear that data carries patterns, tells stories, and can respond when the right questions are asked.&lt;/p&gt;

&lt;p&gt;What also stood out to me was how much of data work is actually about preparation rather than analysis. Before this learning experience, I assumed data analysts spent most of their time discovering insights and producing visualizations. However, I have come to understand that a large part of the process involves cleaning and preparing data—removing duplicates, correcting inconsistencies, standardizing formats, and ensuring accuracy using tools like TRIM and SUBSTITUTE.&lt;/p&gt;

&lt;p&gt;Another powerful feature that stood out to me in Excel is Conditional Formatting. This tool allows data to visually communicate its meaning by automatically highlighting values based on specific rules. For example, high-performing values can be marked in green, while low or concerning values can appear in red. This makes it much easier to quickly interpret patterns, detect outliers, and understand performance trends without going through every single value manually. It showed me how Excel is not just about calculations, but also about turning data into something visually meaningful and easier to interpret.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;My first week of learning Excel has shown me that data analysis starts with strong data foundations. Before advanced tools and complex models come into play, it is Excel that provides the essential skills for organizing, cleaning, validating, and analyzing data.&lt;br&gt;
Through this learning journey, I have gained practical skills in formatting, sorting, filtering, data validation, formulas, and functionstools that are widely used across industries every day. More importantly, I have learned that the quality of any analysis depends on how well the data is managed from the start.&lt;br&gt;
Excel is not just a spreadsheet tool, it is the foundation of effective data analysis. As I continue my journey in Data Science and Analytics, I now understand how powerful Excel is in transforming raw data into meaningful insights that support better decision making.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>data</category>
      <category>analytics</category>
    </item>
    <item>
      <title>Understanding Excel in Real-World Data Analysis: My First Week of Learning.</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Sun, 07 Jun 2026 12:16:49 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/understanding-excel-in-real-world-data-analysis-my-first-week-of-learning-1260</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/understanding-excel-in-real-world-data-analysis-my-first-week-of-learning-1260</guid>
      <description>&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%2F71kr6a8njc9pzjxn92ns.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%2F71kr6a8njc9pzjxn92ns.png" alt=" " width="799" height="275"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before dashboards light up with insights, before SQL queries pull records from databases, and before machine learning models make predictions, most data begins its journey in a spreadsheet. For decades, Microsoft Excel has been the tool that professionals rely on to collect, organize, clean, and analyze information. From tracking hospital records and managing business sales to monitoring project performance and preparing reports, Excel remains one of the most widely used tools in the world of data analysis.&lt;br&gt;
As I began my journey in Data Science and Analytics, I quickly realized that Excel is far more than a simple spreadsheet application. It is often the first place where raw data is transformed into meaningful information. In this article, I explore how Excel is used in real-world data analysis and what I have learnt this week.&lt;/p&gt;
&lt;h3&gt;
  
  
  What is Excel?
&lt;/h3&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application that organises data into rows and columns inside a grid called a worksheet. Each cell in that grid can hold text, numbers, dates, or crucially, formulas that compute values dynamically based on other cells.&lt;/p&gt;
&lt;h4&gt;
  
  
  Understanding Excel’s Structure
&lt;/h4&gt;

&lt;p&gt;I have learnt that Excel is built on a simple but powerful structure that makes it easy to organize and analyze data effectively.&lt;/p&gt;

&lt;p&gt;A workbook is the entire Excel file. It acts like a digital binder that can contain one or more worksheets, allowing users to store related datasets and analyses in a single place.&lt;/p&gt;

&lt;p&gt;A worksheet, often called a sheet, is an individual page within a workbook where data is entered, organized, and analyzed. A single workbook can contain multiple worksheets, each used for different types of information.&lt;/p&gt;

&lt;p&gt;Data in a worksheet is arranged in rows and columns. Rows are horizontal lines identified by numbers and are typically used to represent individual records or observations. Columns are vertical lines identified by letters and are used to store specific categories or variables.&lt;/p&gt;

&lt;p&gt;A cell is the smallest unit in a worksheet, formed by the intersection of a row and a column. It is where data is entered, and each cell has a unique address such as A1 or B5. The Name Box in Excel displays this cell address, helping users quickly identify locations within a dataset.&lt;/p&gt;

&lt;p&gt;A range refers to a selection of two or more cells, often used for calculations, formatting, or analysis. For example, A1 represents a range of cells spanning multiple rows within a single column, allowing users to perform operations on grouped data efficiently.&lt;/p&gt;
&lt;h4&gt;
  
  
  Different types of data in excel.
&lt;/h4&gt;

&lt;p&gt;One of the important lessons I learned while working with Excel is that data comes in different types, and understanding these types is essential for proper analysis. Each type of data behaves differently and determines how it can be used in calculations, sorting, and reporting.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text data, also known as labels, includes words, names, and categories. This type of data is mainly used for identification and description rather than calculations. Examples include product names such as Laptop or Mouse, employee names, or locations like Kampala or Berlin.&lt;/li&gt;
&lt;li&gt;Numeric data represents values that can be used in mathematical operations. This includes numbers such as sales amounts, quantities, and prices. Because numeric data supports calculations, it is the foundation for formulas like sums, averages, and totals in Excel.&lt;/li&gt;
&lt;li&gt;Date and time data represent specific points or periods in time. Examples include dates like 01/06/2026 or timestamps such as 10:30 AM. This type of data is particularly useful for analyzing trends over time, such as monthly sales performance or project timelines.&lt;/li&gt;
&lt;li&gt;Currency data is a special type of numeric data used to represent money values. It is commonly used in business and financial analysis to track sales, expenses, profits, and budgets. For example, values like $500 or UGX 1,200,000 are treated as currency to ensure clarity and consistency in financial reporting.&lt;/li&gt;
&lt;li&gt;Percentage data represents values out of 100 and is often used to show proportions, rates, or changes. Examples include discount rates, growth percentages, and performance indicators such as 15% increase in sales. This type of data is especially useful for comparing performance across categories.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Basic Arithmetic Operations in Excel.
&lt;/h4&gt;

&lt;p&gt;One of the most interesting things I discovered in Excel is that behind every calculation is a simple set of operations that behave almost like building blocks of analysis. At first glance, they may look basic, but together they power almost every financial report, sales summary, and analytical insight.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It starts with addition, where Excel quietly does the work of bringing numbers together. Instead of manually calculating totals, a formula like &lt;code&gt;=A1+B1&lt;/code&gt; instantly combines values, whether it is daily sales, expenses, or quantities.&lt;/li&gt;
&lt;li&gt;Then comes subtraction, which helps uncover differences. With something as simple as &lt;code&gt;=A1-B1&lt;/code&gt;, Excel can show profit after expenses, remaining stock, or performance gaps—turning raw numbers into meaningful comparisons.&lt;/li&gt;
&lt;li&gt;Multiplication takes things a step further. It allows Excel to scale values, such as calculating total cost by multiplying price and quantity using &lt;code&gt;=A1*B1&lt;/code&gt;. This is where simple data begins to feel like real-world business analysis.&lt;/li&gt;
&lt;li&gt;With division, Excel helps break things down into understandable units. A formula like &lt;code&gt;=A1/B1&lt;/code&gt; can show averages per item, cost per unit, or ratios that reveal deeper insights hidden within the data.&lt;/li&gt;
&lt;li&gt;Finally, there is exponentiation, represented by the &lt;code&gt;^&lt;/code&gt; symbol. Something like &lt;code&gt;=A1^2&lt;/code&gt; may seem simple, but it plays an important role in more advanced analysis such as growth trends, projections, and statistical calculations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Excel Shortcuts That Make Work Feel Effortless.
&lt;/h4&gt;

&lt;p&gt;Instead of manually copying and pasting data, a quick &lt;code&gt;Ctrl + C&lt;/code&gt; followed by &lt;code&gt;Ctrl + V&lt;/code&gt; feels like second nature once you get used to it. And when mistakes happen as they always do in data work &lt;code&gt;Ctrl + Z&lt;/code&gt; becomes a lifesaver, allowing you to instantly undo an action and recover your work.&lt;/p&gt;

&lt;p&gt;As datasets grow larger, navigation becomes important. That is where &lt;code&gt;Ctrl +&lt;/code&gt; Arrow Keys comes in, allowing you to jump across thousands of rows or columns in seconds instead of scrolling endlessly.&lt;/p&gt;

&lt;p&gt;When working with structured data, turning on filters is a common task. With just &lt;code&gt;Ctrl + Shift + L&lt;/code&gt;, you can instantly activate filtering and start slicing through data to focus only on what matters.&lt;/p&gt;

&lt;p&gt;Formatting also becomes much easier with &lt;code&gt;Ctrl + 1&lt;/code&gt;, which opens the formatting menu where you can adjust number formats, alignment, and borders to make data clearer and more professional.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Ctrl + A&lt;/code&gt;, which allows you to instantly select all the data in a worksheet or a specific data range. Instead of manually dragging your mouse across rows and columns, this shortcut highlights everything with a single action.&lt;/p&gt;
&lt;h4&gt;
  
  
  A Critical Step in Analysis that I learnt is Data cleaning.
&lt;/h4&gt;

&lt;p&gt;One of the most valuable lessons I learned during my first week with Excel is that the quality of an analysis depends heavily on the quality of the data being analyzed. Even the most advanced analytical techniques can produce misleading results if the underlying data is inaccurate or incomplete.&lt;/p&gt;

&lt;p&gt;In real-world scenarios, datasets often contain duplicate records, missing values, inconsistent formatting, extra spaces, and incorrect entries. These issues can lead to errors in calculations, inaccurate reports, and poor decision-making.&lt;/p&gt;

&lt;p&gt;Excel provides several tools that help address these challenges, including Remove Duplicates, text functions such as TRIM() and PROPER(), and data validation features that improve data accuracy and consistency. By cleaning and preparing data before analysis, analysts can ensure that their findings are reliable and meaningful.&lt;/p&gt;
&lt;h4&gt;
  
  
  Function Purpose Examples I learnt.
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPPER() Converts text to uppercase =UPPER("jose") → JOSE
LOWER() Converts text to lowercase =LOWER("JOSE") → jose
PROPER() Capitalizes first letter of each
word =PROPER("jose macky") → Jose Macky
TRIM() Removes extra spaces from
text =TRIM(" Jose Macky ") → Jose Macky
LEFT() Extracts leftmost characters =LEFT("Jose", 2) → Jo
RIGHT() Extracts rightmost characters =RIGHT("Jose", 2) → hn
MID() Extracts characters from the
middle =MID("Jose", 2, 2) → oh
LEN() Returns length of text =LEN("Jose") → 4
FIND() Finds position of a substring
(case-sensitive) =FIND("o", "Jose") → 3
SUBSTITUTE() Replaces text within a string
=SUBSTITUTE("Jose Macky", "Macky",
"Smith") → Jose Smith

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

&lt;/div&gt;

&lt;h4&gt;
  
  
  I also learnt Why Excel Matters in Data Analysis
&lt;/h4&gt;

&lt;p&gt;Data analysis is about turning raw data into meaningful insights that support better decision-making. However, before any patterns can be identified or trends discovered, data must first be collected, organized, and prepared. This is where Excel plays a crucial role.&lt;/p&gt;

&lt;p&gt;Excel serves as the foundation for many data analysis workflows because it provides a simple yet powerful environment for managing data. It enables users to organize information into structured tables, perform calculations automatically, clean and validate datasets, and quickly sort or filter records to focus on relevant information. These capabilities allow analysts to transform raw data into accurate, reliable, and actionable insights.&lt;/p&gt;

&lt;p&gt;Whether tracking sales performance, managing patient records, analyzing survey responses, or monitoring project indicators, Excel remains one of the most widely used tools for preparing data for analysis and informed decision-making.&lt;/p&gt;
&lt;h4&gt;
  
  
  Organizing Data for Better Insights
&lt;/h4&gt;

&lt;p&gt;A key takeaway from my first week of learning Excel is that effective data analysis begins with proper data organization. Excel structures information into rows and columns, creating datasets that are easy to understand, manage, and analyze.&lt;br&gt;
For example, a retail company might use Excel to record and organize sales transactions as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;Product&lt;/span&gt;     &lt;span class="k"&gt;Quantity&lt;/span&gt; &lt;span class="k"&gt;Sold&lt;/span&gt;   &lt;span class="k"&gt;Unit&lt;/span&gt; &lt;span class="k"&gt;Price&lt;/span&gt;   &lt;span class="k"&gt;Sales&lt;/span&gt; &lt;span class="k"&gt;Date&lt;/span&gt;
&lt;span class="k"&gt;Laptop&lt;/span&gt;             &lt;span class="mf"&gt;10&lt;/span&gt;           &lt;span class="nv"&gt;$500&lt;/span&gt;          &lt;span class="ld"&gt;01/06/2026&lt;/span&gt;
&lt;span class="k"&gt;Mouse&lt;/span&gt;              &lt;span class="mf"&gt;25&lt;/span&gt;           &lt;span class="nv"&gt;$15&lt;/span&gt;        &lt;span class="ld"&gt;02/06/2026&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;With data organized in this format, it becomes much easier to calculate revenue, identify best selling products, track sales trends over time, and generate reports that support business decision-making. This demonstrates how Excel's structured layout transforms raw data into information that can be analyzed effectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  Sorting and Filtering for Better Insights
&lt;/h4&gt;

&lt;p&gt;As datasets grow larger, finding specific information manually becomes increasingly difficult and time consuming. This is where Excel's sorting and filtering features become valuable tools for data analysis.&lt;/p&gt;

&lt;p&gt;Sorting allows users to arrange data in a meaningful order, such as ranking student scores from highest to lowest or organizing products by price. Filtering, on the other hand, enables users to display only the records that meet specific criteria while temporarily hiding the rest.&lt;/p&gt;

&lt;p&gt;For example, a school administrator can sort examination scores to quickly identify top-performing students, while a sales manager can filter transactions to view sales from a particular region or month. These features make it easier to explore data, identify trends, and focus on relevant information without modifying the original dataset.&lt;/p&gt;

&lt;h4&gt;
  
  
  Using Formulas and Functions to Automate Analysis
&lt;/h4&gt;

&lt;p&gt;One of Excel’s most powerful capabilities is its ability to automate calculations using formulas. Instead of relying on manual calculations or external tools, Excel allows users to build dynamic formulas that automatically update whenever the underlying data changes.&lt;/p&gt;

&lt;p&gt;This makes it especially useful in real-world scenarios such as calculating monthly expenses, determining employee salaries, computing student performance averages, or estimating project costs. For example, a simple formula like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;=A1+B1&lt;/code&gt;&lt;br&gt;
adds the values in two cells and instantly updates the result whenever either value changes. This dynamic behavior reduces manual effort and minimizes the risk of errors.&lt;/p&gt;

&lt;p&gt;Beyond basic formulas, Excel also provides built-in functions that simplify and speed up data analysis.&lt;/p&gt;

&lt;p&gt;Some of the most commonly used functions include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SUM() – Adds a range of values
Example: =SUM(B2)
AVERAGE() – Calculates the mean of a dataset
Example: =AVERAGE(B2)
MAX() – Returns the highest value in a range
Example: =MAX(B2)
MIN() – Returns the lowest value in a range
Example: =MIN(B2)
COUNT() – Counts the number of numeric entries in a range
Example: =COUNT(B2)
SUMIFS() – A function that adds values based on multiple conditions.
AVERAGEIFS() – A function that calculates the average of values based on multiple conditions.


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

&lt;/div&gt;



&lt;p&gt;These functions are widely used in data analysis to quickly summarize large datasets and uncover key trends. They help analysts move from raw numbers to meaningful insights in a matter of seconds.&lt;/p&gt;

&lt;h4&gt;
  
  
  Date and Time Functions in Excel
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;TODAY() → =TODAY() → returns: 07/06/2026&lt;br&gt;
NOW() → =NOW() → returns: 07/06/2026 14:35&lt;br&gt;
DATE() → =DATE(2026,6,7) → returns: 07/06/2026&lt;br&gt;
TIME() → =TIME(14,30,0) → returns: 14:30:00&lt;br&gt;
DAY() → =DAY("07/06/2026") → returns: 7&lt;br&gt;
MONTH() → =MONTH("07/06/2026") → returns: 6&lt;br&gt;
YEAR() → =YEAR("07/06/2026") → returns: 2026&lt;br&gt;
HOUR() → =HOUR("14:45:00") → returns: 14&lt;br&gt;
MINUTE() → =MINUTE("14:45:00") → returns: 45&lt;br&gt;
SECOND() → =SECOND("14:45:30") → returns: 30&lt;br&gt;
DAYS() → =DAYS("10/06/2026","01/06/2026") → returns: 9&lt;br&gt;
NETWORKDAYS() → =NETWORKDAYS("01/06/2026","10/06/2026") → returns: 8&lt;br&gt;
EDATE() → =EDATE("01/06/2026",2) → returns: 01/08/2026&lt;br&gt;
&lt;/code&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  Real-World Applications of Excel in Different Industries
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the business and sales sector, companies use Excel to track sales performance, monitor inventory levels, analyze customer trends, and prepare financial reports. These activities help organizations understand their performance and make informed decisions that improve efficiency and profitability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In healthcare, Excel plays an important role in managing and analyzing data. Hospitals and health programs use it to track patient information, monitor disease trends, generate monthly reports, and support monitoring and evaluation activities. This helps health professionals maintain accurate records and improve service delivery.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In education, schools and academic institutions rely on Excel to record student performance, calculate grades, track attendance, and generate academic reports. This simplifies administrative work and ensures that student data is well-organized and easy to access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the agriculture sector, Excel is used to monitor crop yields, analyze farmer productivity, track training attendance, and manage project performance indicators. These insights help agricultural organizations improve planning and support farmers more effectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In monitoring and evaluation, Excel is a key tool for data management and reporting. It is used to clean survey datasets, calculate indicators, track project progress, and produce donor reports. This ensures that program data is accurate, consistent, and useful for decision making.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Personal Reflection.
&lt;/h4&gt;

&lt;p&gt;Before learning Excel, I viewed data as something abstract hidden inside systems and far removed from everyday understanding. After working with Excel, that perception changed. Data became something tangible, something I could explore, manipulate, and question directly.&lt;/p&gt;

&lt;p&gt;As I began to use Excel more deeply, I realized that data is not just passive information sitting in a system. It is something that can be explored and interrogated. Even simple analyses, such as using a SUMIFS formula to answer a question like how many projects in Berlin, handled by employees above 30 years, were completed, helped me see data in a new light. It became clear that data carries patterns, tells stories, and can respond when the right questions are asked.&lt;/p&gt;

&lt;p&gt;What also stood out to me was how much of data work is actually about preparation rather than analysis. Before this learning experience, I assumed data analysts spent most of their time discovering insights and producing visualizations. However, I have come to understand that a large part of the process involves cleaning and preparing data removing duplicates, correcting inconsistencies, standardizing formats, and ensuring accuracy using tools like TRIM and SUBSTITUTE.&lt;/p&gt;

&lt;p&gt;Another powerful feature that stood out to me in Excel is Conditional Formatting. This tool allows data to visually communicate its meaning by automatically highlighting values based on specific rules. For example, high-performing values can be marked in green, while low or concerning values can appear in red. This makes it much easier to quickly interpret patterns, detect outliers, and understand performance trends without going through every single value manually. It showed me how Excel is not just about calculations, but also about turning data into something visually meaningful and easier to interpret.&lt;/p&gt;

&lt;p&gt;And lastly, Data Validation in Excel is one of those features that controls what data can be entered into a cell to ensure accuracy and consistency. It helps prevent errors by setting rules such as allowing only numbers within a range, specific dates, or predefined list values. A common use is dropdown lists, which reduce typing mistakes and maintain uniform data entry, thus improving data quality by ensuring that only valid and reliable information is captured from the start.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;My first week of learning Excel has shown me that data analysis starts with strong data foundations. Before advanced tools and complex models come into play, it is Excel that provides the essential skills for organizing, cleaning, validating, and analyzing data.&lt;br&gt;
Through this learning journey, I have gained practical skills in formatting, sorting, filtering, data validation, formulas, and functionstools that are widely used across industries every day. More importantly, I have learned that the quality of any analysis depends on how well the data is managed from the start.&lt;br&gt;
Excel is not just a spreadsheet tool, it is the foundation of effective data analysis. As I continue my journey in Data Science and Analytics, I now understand how powerful Excel is in transforming raw data into meaningful insights that support better decision making.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>excel</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Understanding Excel in Real-World Data Analysis: My First Week of Learning.</title>
      <dc:creator>Josephine Mackylah</dc:creator>
      <pubDate>Sun, 07 Jun 2026 12:16:49 +0000</pubDate>
      <link>https://dev.to/josephine_mackylah_d6b31f/understanding-excel-in-real-world-data-analysis-my-first-week-of-learning-4p92</link>
      <guid>https://dev.to/josephine_mackylah_d6b31f/understanding-excel-in-real-world-data-analysis-my-first-week-of-learning-4p92</guid>
      <description>&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%2F71kr6a8njc9pzjxn92ns.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%2F71kr6a8njc9pzjxn92ns.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before dashboards light up with insights, before SQL queries pull records from databases, and before machine learning models make predictions, most data begins its journey in a spreadsheet. For decades, Microsoft Excel has been the tool that professionals rely on to collect, organize, clean, and analyze information. From tracking hospital records and managing business sales to monitoring project performance and preparing reports, Excel remains one of the most widely used tools in the world of data analysis.&lt;br&gt;
As I began my journey in Data Science and Analytics, I quickly realized that Excel is far more than a simple spreadsheet application. It is often the first place where raw data is transformed into meaningful information. In this article, I explore how Excel is used in real-world data analysis and what I have learnt this week.&lt;/p&gt;
&lt;h3&gt;
  
  
  What is Excel?
&lt;/h3&gt;

&lt;p&gt;Microsoft Excel is a spreadsheet application that organises data into rows and columns inside a grid called a worksheet. Each cell in that grid can hold text, numbers, dates, or crucially, formulas that compute values dynamically based on other cells.&lt;/p&gt;
&lt;h4&gt;
  
  
  Understanding Excel’s Structure
&lt;/h4&gt;

&lt;p&gt;I have learnt that Excel is built on a simple but powerful structure that makes it easy to organize and analyze data effectively.&lt;/p&gt;

&lt;p&gt;A workbook is the entire Excel file. It acts like a digital binder that can contain one or more worksheets, allowing users to store related datasets and analyses in a single place.&lt;/p&gt;

&lt;p&gt;A worksheet, often called a sheet, is an individual page within a workbook where data is entered, organized, and analyzed. A single workbook can contain multiple worksheets, each used for different types of information.&lt;/p&gt;

&lt;p&gt;Data in a worksheet is arranged in rows and columns. Rows are horizontal lines identified by numbers and are typically used to represent individual records or observations. Columns are vertical lines identified by letters and are used to store specific categories or variables.&lt;/p&gt;

&lt;p&gt;A cell is the smallest unit in a worksheet, formed by the intersection of a row and a column. It is where data is entered, and each cell has a unique address such as A1 or B5. The Name Box in Excel displays this cell address, helping users quickly identify locations within a dataset.&lt;/p&gt;

&lt;p&gt;A range refers to a selection of two or more cells, often used for calculations, formatting, or analysis. For example, A1 represents a range of cells spanning multiple rows within a single column, allowing users to perform operations on grouped data efficiently.&lt;/p&gt;
&lt;h4&gt;
  
  
  Different types of data in excel.
&lt;/h4&gt;

&lt;p&gt;One of the important lessons I learned while working with Excel is that data comes in different types, and understanding these types is essential for proper analysis. Each type of data behaves differently and determines how it can be used in calculations, sorting, and reporting.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Text data, also known as labels, includes words, names, and categories. This type of data is mainly used for identification and description rather than calculations. Examples include product names such as Laptop or Mouse, employee names, or locations like Kampala or Berlin.&lt;/li&gt;
&lt;li&gt;Numeric data represents values that can be used in mathematical operations. This includes numbers such as sales amounts, quantities, and prices. Because numeric data supports calculations, it is the foundation for formulas like sums, averages, and totals in Excel.&lt;/li&gt;
&lt;li&gt;Date and time data represent specific points or periods in time. Examples include dates like 01/06/2026 or timestamps such as 10:30 AM. This type of data is particularly useful for analyzing trends over time, such as monthly sales performance or project timelines.&lt;/li&gt;
&lt;li&gt;Currency data is a special type of numeric data used to represent money values. It is commonly used in business and financial analysis to track sales, expenses, profits, and budgets. For example, values like $500 or UGX 1,200,000 are treated as currency to ensure clarity and consistency in financial reporting.&lt;/li&gt;
&lt;li&gt;Percentage data represents values out of 100 and is often used to show proportions, rates, or changes. Examples include discount rates, growth percentages, and performance indicators such as 15% increase in sales. This type of data is especially useful for comparing performance across categories.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Basic Arithmetic Operations in Excel.
&lt;/h4&gt;

&lt;p&gt;One of the most interesting things I discovered in Excel is that behind every calculation is a simple set of operations that behave almost like building blocks of analysis. At first glance, they may look basic, but together they power almost every financial report, sales summary, and analytical insight.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It starts with addition, where Excel quietly does the work of bringing numbers together. Instead of manually calculating totals, a formula like &lt;code&gt;=A1+B1&lt;/code&gt; instantly combines values, whether it is daily sales, expenses, or quantities.&lt;/li&gt;
&lt;li&gt;Then comes subtraction, which helps uncover differences. With something as simple as &lt;code&gt;=A1-B1&lt;/code&gt;, Excel can show profit after expenses, remaining stock, or performance gaps—turning raw numbers into meaningful comparisons.&lt;/li&gt;
&lt;li&gt;Multiplication takes things a step further. It allows Excel to scale values, such as calculating total cost by multiplying price and quantity using &lt;code&gt;=A1*B1&lt;/code&gt;. This is where simple data begins to feel like real-world business analysis.&lt;/li&gt;
&lt;li&gt;With division, Excel helps break things down into understandable units. A formula like &lt;code&gt;=A1/B1&lt;/code&gt; can show averages per item, cost per unit, or ratios that reveal deeper insights hidden within the data.&lt;/li&gt;
&lt;li&gt;Finally, there is exponentiation, represented by the &lt;code&gt;^&lt;/code&gt; symbol. Something like &lt;code&gt;=A1^2&lt;/code&gt; may seem simple, but it plays an important role in more advanced analysis such as growth trends, projections, and statistical calculations.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Excel Shortcuts That Make Work Feel Effortless.
&lt;/h4&gt;

&lt;p&gt;Instead of manually copying and pasting data, a quick &lt;code&gt;Ctrl + C&lt;/code&gt; followed by &lt;code&gt;Ctrl + V&lt;/code&gt; feels like second nature once you get used to it. And when mistakes happen as they always do in data work &lt;code&gt;Ctrl + Z&lt;/code&gt; becomes a lifesaver, allowing you to instantly undo an action and recover your work.&lt;/p&gt;

&lt;p&gt;As datasets grow larger, navigation becomes important. That is where &lt;code&gt;Ctrl +&lt;/code&gt; Arrow Keys comes in, allowing you to jump across thousands of rows or columns in seconds instead of scrolling endlessly.&lt;/p&gt;

&lt;p&gt;When working with structured data, turning on filters is a common task. With just &lt;code&gt;Ctrl + Shift + L&lt;/code&gt;, you can instantly activate filtering and start slicing through data to focus only on what matters.&lt;/p&gt;

&lt;p&gt;Formatting also becomes much easier with &lt;code&gt;Ctrl + 1&lt;/code&gt;, which opens the formatting menu where you can adjust number formats, alignment, and borders to make data clearer and more professional.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Ctrl + A&lt;/code&gt;, which allows you to instantly select all the data in a worksheet or a specific data range. Instead of manually dragging your mouse across rows and columns, this shortcut highlights everything with a single action.&lt;/p&gt;
&lt;h4&gt;
  
  
  A Critical Step in Analysis that I learnt is Data cleaning.
&lt;/h4&gt;

&lt;p&gt;One of the most valuable lessons I learned during my first week with Excel is that the quality of an analysis depends heavily on the quality of the data being analyzed. Even the most advanced analytical techniques can produce misleading results if the underlying data is inaccurate or incomplete.&lt;/p&gt;

&lt;p&gt;In real-world scenarios, datasets often contain duplicate records, missing values, inconsistent formatting, extra spaces, and incorrect entries. These issues can lead to errors in calculations, inaccurate reports, and poor decision-making.&lt;/p&gt;

&lt;p&gt;Excel provides several tools that help address these challenges, including Remove Duplicates, text functions such as TRIM() and PROPER(), and data validation features that improve data accuracy and consistency. By cleaning and preparing data before analysis, analysts can ensure that their findings are reliable and meaningful.&lt;/p&gt;
&lt;h4&gt;
  
  
  Function Purpose Examples I learnt.
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;UPPER() Converts text to uppercase =UPPER("jose") → JOSE
LOWER() Converts text to lowercase =LOWER("JOSE") → jose
PROPER() Capitalizes first letter of each
word =PROPER("jose macky") → Jose Macky
TRIM() Removes extra spaces from
text =TRIM(" Jose Macky ") → Jose Macky
LEFT() Extracts leftmost characters =LEFT("Jose", 2) → Jo
RIGHT() Extracts rightmost characters =RIGHT("Jose", 2) → hn
MID() Extracts characters from the
middle =MID("Jose", 2, 2) → oh
LEN() Returns length of text =LEN("Jose") → 4
FIND() Finds position of a substring
(case-sensitive) =FIND("o", "Jose") → 3
SUBSTITUTE() Replaces text within a string
=SUBSTITUTE("Jose Macky", "Macky",
"Smith") → Jose Smith

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

&lt;/div&gt;

&lt;h4&gt;
  
  
  I also learnt Why Excel Matters in Data Analysis
&lt;/h4&gt;

&lt;p&gt;Data analysis is about turning raw data into meaningful insights that support better decision-making. However, before any patterns can be identified or trends discovered, data must first be collected, organized, and prepared. This is where Excel plays a crucial role.&lt;/p&gt;

&lt;p&gt;Excel serves as the foundation for many data analysis workflows because it provides a simple yet powerful environment for managing data. It enables users to organize information into structured tables, perform calculations automatically, clean and validate datasets, and quickly sort or filter records to focus on relevant information. These capabilities allow analysts to transform raw data into accurate, reliable, and actionable insights.&lt;/p&gt;

&lt;p&gt;Whether tracking sales performance, managing patient records, analyzing survey responses, or monitoring project indicators, Excel remains one of the most widely used tools for preparing data for analysis and informed decision-making.&lt;/p&gt;
&lt;h4&gt;
  
  
  Organizing Data for Better Insights
&lt;/h4&gt;

&lt;p&gt;A key takeaway from my first week of learning Excel is that effective data analysis begins with proper data organization. Excel structures information into rows and columns, creating datasets that are easy to understand, manage, and analyze.&lt;br&gt;
For example, a retail company might use Excel to record and organize sales transactions as shown below:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight csvs"&gt;&lt;code&gt;&lt;span class="k"&gt;Product&lt;/span&gt;     &lt;span class="k"&gt;Quantity&lt;/span&gt; &lt;span class="k"&gt;Sold&lt;/span&gt;   &lt;span class="k"&gt;Unit&lt;/span&gt; &lt;span class="k"&gt;Price&lt;/span&gt;   &lt;span class="k"&gt;Sales&lt;/span&gt; &lt;span class="k"&gt;Date&lt;/span&gt;
&lt;span class="k"&gt;Laptop&lt;/span&gt;             &lt;span class="mf"&gt;10&lt;/span&gt;           &lt;span class="nv"&gt;$500&lt;/span&gt;          &lt;span class="ld"&gt;01/06/2026&lt;/span&gt;
&lt;span class="k"&gt;Mouse&lt;/span&gt;              &lt;span class="mf"&gt;25&lt;/span&gt;           &lt;span class="nv"&gt;$15&lt;/span&gt;        &lt;span class="ld"&gt;02/06/2026&lt;/span&gt;

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

&lt;/div&gt;



&lt;p&gt;With data organized in this format, it becomes much easier to calculate revenue, identify best selling products, track sales trends over time, and generate reports that support business decision-making. This demonstrates how Excel's structured layout transforms raw data into information that can be analyzed effectively.&lt;/p&gt;

&lt;h4&gt;
  
  
  Sorting and Filtering for Better Insights
&lt;/h4&gt;

&lt;p&gt;As datasets grow larger, finding specific information manually becomes increasingly difficult and time consuming. This is where Excel's sorting and filtering features become valuable tools for data analysis.&lt;/p&gt;

&lt;p&gt;Sorting allows users to arrange data in a meaningful order, such as ranking student scores from highest to lowest or organizing products by price. Filtering, on the other hand, enables users to display only the records that meet specific criteria while temporarily hiding the rest.&lt;/p&gt;

&lt;p&gt;For example, a school administrator can sort examination scores to quickly identify top-performing students, while a sales manager can filter transactions to view sales from a particular region or month. These features make it easier to explore data, identify trends, and focus on relevant information without modifying the original dataset.&lt;/p&gt;

&lt;h4&gt;
  
  
  Using Formulas and Functions to Automate Analysis
&lt;/h4&gt;

&lt;p&gt;One of Excel’s most powerful capabilities is its ability to automate calculations using formulas. Instead of relying on manual calculations or external tools, Excel allows users to build dynamic formulas that automatically update whenever the underlying data changes.&lt;/p&gt;

&lt;p&gt;This makes it especially useful in real-world scenarios such as calculating monthly expenses, determining employee salaries, computing student performance averages, or estimating project costs. For example, a simple formula like:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;=A1+B1&lt;/code&gt;&lt;br&gt;
adds the values in two cells and instantly updates the result whenever either value changes. This dynamic behavior reduces manual effort and minimizes the risk of errors.&lt;/p&gt;

&lt;p&gt;Beyond basic formulas, Excel also provides built-in functions that simplify and speed up data analysis.&lt;/p&gt;

&lt;p&gt;Some of the most commonly used functions include:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;SUM() – Adds a range of values
Example: =SUM(B2)
AVERAGE() – Calculates the mean of a dataset
Example: =AVERAGE(B2)
MAX() – Returns the highest value in a range
Example: =MAX(B2)
MIN() – Returns the lowest value in a range
Example: =MIN(B2)
COUNT() – Counts the number of numeric entries in a range
Example: =COUNT(B2)
SUMIFS() – A function that adds values based on multiple conditions.
AVERAGEIFS() – A function that calculates the average of values based on multiple conditions.


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

&lt;/div&gt;



&lt;p&gt;These functions are widely used in data analysis to quickly summarize large datasets and uncover key trends. They help analysts move from raw numbers to meaningful insights in a matter of seconds.&lt;/p&gt;

&lt;h4&gt;
  
  
  Date and Time Functions in Excel
&lt;/h4&gt;

&lt;p&gt;&lt;code&gt;TODAY() → =TODAY() → returns: 07/06/2026&lt;br&gt;
NOW() → =NOW() → returns: 07/06/2026 14:35&lt;br&gt;
DATE() → =DATE(2026,6,7) → returns: 07/06/2026&lt;br&gt;
TIME() → =TIME(14,30,0) → returns: 14:30:00&lt;br&gt;
DAY() → =DAY("07/06/2026") → returns: 7&lt;br&gt;
MONTH() → =MONTH("07/06/2026") → returns: 6&lt;br&gt;
YEAR() → =YEAR("07/06/2026") → returns: 2026&lt;br&gt;
HOUR() → =HOUR("14:45:00") → returns: 14&lt;br&gt;
MINUTE() → =MINUTE("14:45:00") → returns: 45&lt;br&gt;
SECOND() → =SECOND("14:45:30") → returns: 30&lt;br&gt;
DAYS() → =DAYS("10/06/2026","01/06/2026") → returns: 9&lt;br&gt;
NETWORKDAYS() → =NETWORKDAYS("01/06/2026","10/06/2026") → returns: 8&lt;br&gt;
EDATE() → =EDATE("01/06/2026",2) → returns: 01/08/2026&lt;br&gt;
&lt;/code&gt; &lt;/p&gt;

&lt;h4&gt;
  
  
  Real-World Applications of Excel in Different Industries
&lt;/h4&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;In the business and sales sector, companies use Excel to track sales performance, monitor inventory levels, analyze customer trends, and prepare financial reports. These activities help organizations understand their performance and make informed decisions that improve efficiency and profitability.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In healthcare, Excel plays an important role in managing and analyzing data. Hospitals and health programs use it to track patient information, monitor disease trends, generate monthly reports, and support monitoring and evaluation activities. This helps health professionals maintain accurate records and improve service delivery.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In education, schools and academic institutions rely on Excel to record student performance, calculate grades, track attendance, and generate academic reports. This simplifies administrative work and ensures that student data is well-organized and easy to access.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In the agriculture sector, Excel is used to monitor crop yields, analyze farmer productivity, track training attendance, and manage project performance indicators. These insights help agricultural organizations improve planning and support farmers more effectively.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In monitoring and evaluation, Excel is a key tool for data management and reporting. It is used to clean survey datasets, calculate indicators, track project progress, and produce donor reports. This ensures that program data is accurate, consistent, and useful for decision making.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;
  
  
  Personal Reflection.
&lt;/h4&gt;

&lt;p&gt;Before learning Excel, I viewed data as something abstract—hidden inside systems and far removed from everyday understanding. After working with Excel, that perception changed. Data became something tangible, something I could explore, manipulate, and question directly.&lt;/p&gt;

&lt;p&gt;As I began to use Excel more deeply, I realized that data is not just passive information sitting in a system. It is something that can be explored and interrogated. Even simple analyses, such as using a SUMIFS formula to answer a question like how many projects in Berlin, handled by employees above 30 years, were completed, helped me see data in a new light. It became clear that data carries patterns, tells stories, and can respond when the right questions are asked.&lt;/p&gt;

&lt;p&gt;What also stood out to me was how much of data work is actually about preparation rather than analysis. Before this learning experience, I assumed data analysts spent most of their time discovering insights and producing visualizations. However, I have come to understand that a large part of the process involves cleaning and preparing data removing duplicates, correcting inconsistencies, standardizing formats, and ensuring accuracy using tools like TRIM and SUBSTITUTE.&lt;/p&gt;

&lt;p&gt;Another powerful feature that stood out to me in Excel is Conditional Formatting. This tool allows data to visually communicate its meaning by automatically highlighting values based on specific rules. For example, high-performing values can be marked in green, while low or concerning values can appear in red. This makes it much easier to quickly interpret patterns, detect outliers, and understand performance trends without going through every single value manually. It showed me how Excel is not just about calculations, but also about turning data into something visually meaningful and easier to interpret.&lt;/p&gt;

&lt;p&gt;And lastly, Data Validation in Excel is one of those features that controls what data can be entered into a cell to ensure accuracy and consistency. It helps prevent errors by setting rules such as allowing only numbers within a range, specific dates, or predefined list values. A common use is dropdown lists, which reduce typing mistakes and maintain uniform data entry, thus improving data quality by ensuring that only valid and reliable information is captured from the start.&lt;/p&gt;

&lt;h4&gt;
  
  
  Conclusion
&lt;/h4&gt;

&lt;p&gt;My first week of learning Excel has shown me that data analysis starts with strong data foundations. Before advanced tools and complex models come into play, it is Excel that provides the essential skills for organizing, cleaning, validating, and analyzing data.&lt;br&gt;
Through this learning journey, I have gained practical skills in formatting, sorting, filtering, data validation, formulas, and functionstools that are widely used across industries every day. More importantly, I have learned that the quality of any analysis depends on how well the data is managed from the start.&lt;br&gt;
Excel is not just a spreadsheet tool, it is the foundation of effective data analysis. As I continue my journey in Data Science and Analytics, I now understand how powerful Excel is in transforming raw data into meaningful insights that support better decision making.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>learning</category>
      <category>excel</category>
      <category>datascience</category>
    </item>
  </channel>
</rss>
