I'm sure every time you listen to people in tech talk about coding languages, you have heard the mention "Python" several times. If you're like me, I'm sure you are wondering what Python is.
Python is a simple and powerful programming language used to automate tasks, analyze data, and build software by giving clear instructions to a computer.
If you’ve worked with Excel long enough, you’ve probably hit at least one of these limits:
- Your file crashes when it gets too big
- Formulas become impossible to track
- You spend hours repeating the same cleaning steps every week
Python usually enters the picture at that exact moment.
It’s not that Excel is bad, it’s just that it wasn’t designed for scale or automation. Python, on the other hand, is built for handling large datasets, repeating tasks reliably, and giving you full control over how data is processed.
What surprises most beginners is this:
You don’t need to become a “software developer” to use Python effectively. For data work, you’re mostly writing small, practical scripts.
Step 1: Setting Up Your Environment
To get started, you need:
Python installed (Anaconda is the easiest option for beginners). Mine is version 3.12
A tool to write and run code (Jupyter Notebook is recommended)
Once installed, open Jupyter Notebook.
Step 2: Writing Your First Python Code
In the notebook, you’ll see a blank cell. This is where you write code.
Try this:
print("Hello, World!")
Click Run.

Step 3: Working with Data Using Pandas
For data analysis, Python uses a library called pandas.
First, import it:
import pandas as pd
Loading a Dataset
Let’s load a CSV file (similar to opening an Excel file):
df = pd.read_csv("sales.csv")
df.head()
What’s happening here:
read_csv() loads your data
head() shows the first few rows
This table is called a DataFrame - your main workspace in Python.
Step 4: Basic Data Operations (What You Already Do in Excel)
Creating a New Column
In Excel, you would write a formula and drag it down.
In Python:
df['Total'] = df['Price'] * df['Quantity']Filtering Data
To filter rows:
df[df['Region'] == 'Nairobi']
This is like applying a filter in Excel, but faster and reusable.Summarizing Data (Like a Pivot Table)
df.groupby('Region')['Total'].sum()
This shows total sales per region.
Step 5: Using Variables (Making Your Work Clear)
Instead of hardcoding values, Python lets you name them:
tax_rate = 0.16
df['Tax'] = df['Total'] * tax_rate
This makes your work easier to understand and update.
Step 6: Automating Decisions with Logic
Let’s say you want to label customers as Active or Inactive.
df['Status'] = df['Last_Purchase_Date'].apply(
lambda x: 'Inactive' if x < '2025-01-01' else 'Active'
)
This replaces manual sorting and tagging.
Step 7: Saving Your Results
Once you’re done, you can export your data:
df.to_csv("processed_data.csv", index=False)
Beginner Tips (Based on Real Experience)
- Start with datasets you already understand
- Don’t try to learn everything at once
- Expect errors- they’re part of the process
- Focus on doing, not memorizing
I hope that this article makes it a bit easier for you to try out Python. See you in the next article as I shed more light to what Python is.


Top comments (0)