Mctaba Labs logo
BootcampData ScienceThe WhiteboardProjectsEventsMasterclassesWebinarsLearn
Book CallApply

500+ developers already in the community

Get answers, find accountability partners, and stay ahead

Join Discord →
Mctaba Labs logo

Educating 1 million students in tech by 2030.

Programs

  • Coding Bootcamp in Nairobi
  • Data Science to AI Engineering
  • HighSchool Graduates Launchpad
  • AI & Business Automation
  • Corporate Training
  • Kids & Teens
  • McTaba Story & Mission
  • Full-Stack Curriculum
  • Course Pricing & Plans
  • Frequently Asked Questions

Resources

  • Join Discord Community
  • Tech Events in Nairobi
  • Masterclasses
  • Free Resources
  • Learn
  • Data Science Guides
  • African Payments Reference
  • Campus
  • Africa Tech Talent Report
  • Partner With Us
  • Start a Project
  • Software & AI Studio
  • Our Work
  • Outcomes

Contact Us

  • 124 Manyani East Road, Lavington, Nairobi
  • +254727795603
  • Book a Discovery Call

Office Hours:

Mon-Fri: 9am - 2pm EAT

Sat: 10am - 12pm EAT

© 2026 Mctaba Labs - A product of Edtech Industries. All rights reserved.

Privacy PolicyTerms of ServiceRefund Policy
  1. Learn
  2. Data Science in Kenya
  3. Kaggle for Beginners: Your First Competition
Bonaventure OgetoBy Bonaventure Ogeto|Updated November 3, 2026

Last checked 3 November 2026

Kaggle for Beginners: Your First Competition

Make a free Kaggle account, join the Titanic starter competition, open a notebook from its Code tab, train a small random forest on train.csv, write a submission.csv with PassengerId and Survived and press Submit. Then improve one thing at a time and keep notes.

In this article

  1. 1. What Kaggle is, and why start with Titanic
  2. 2. Build a baseline in a notebook
  3. 3. Write the file and submit
  4. 4. Make the second try better

What Kaggle is, and why start with Titanic

McTaba runs coding and data bootcamps in Kenya. This guide is written to be useful whether or not you ever join one.

Kaggle is a website where people share datasets, run code in a browser notebook and enter prediction contests. You need only a laptop and internet. Our own labs run on Google Colab and Kaggle too. This tutorial is a project on our data science career map.

Most beginners enter the starter competition called Titanic - Machine Learning from Disaster (checked on 3 November 2026). You get a file of passengers with a known outcome, and a second file where the outcome is hidden. You predict the hidden column and upload your guesses.

The data is old and not Kenyan, but that is the point. Thousands of walkthroughs exist, the rules are simple and a wrong answer costs you nothing. Once you know the routine, move to local data, such as the sets in our list of Kenyan open datasets.

StageWhat you do
1. JoinCreate an account, open the competition, accept the rules
2. NotebookStart a notebook from the Code tab
3. BaselineClean five columns, train one model
4. SubmitWrite submission.csv and press Submit
5. ImproveChange one thing, score again, note the result

Our Data Science to AI Engineering programme runs its labs on Google Colab and Kaggle, so this routine carries straight over.

Build a baseline in a notebook

Open the competition, click Code, then New Notebook. Kaggle attaches the competition files for you. Check the path printed on the Data panel, since it is usually under /kaggle/input/.

import pandas as pd
from sklearn.ensemble import RandomForestClassifier
from sklearn.model_selection import cross_val_score

D = "/kaggle/input/titanic/"
train = pd.read_csv(D + "train.csv")
test = pd.read_csv(D + "test.csv")

def prepare(df):
    return pd.DataFrame({
        "Pclass": df["Pclass"],
        "female": (df["Sex"] == "female").astype(int),
        "Age": df["Age"].fillna(30),
        "Fare": df["Fare"].fillna(14),
        "family": df["SibSp"] + df["Parch"],
    })

X, y = prepare(train), train["Survived"]
model = RandomForestClassifier(
    n_estimators=200, max_depth=5, random_state=0)
print(cross_val_score(model, X, y, cv=5).mean())

This keeps five simple columns, fills blank ages and fares with a plain number, and scores the model with five-fold cross-validation: the training file is split five ways, and each part takes a turn as the test. That score is your honest estimate before you submit.

If you have not used pandas before, read the pandas tutorial on a shop's sales first. The filling of blanks above is the same idea.

Get weekly developer tips

Join 25,000+ developers. Practical guides, job tips, and new content — straight to your inbox.

No spam. Unsubscribe anytime.

Write the file and submit

model.fit(X, y)
sub = pd.DataFrame({
    "PassengerId": test["PassengerId"],
    "Survived": model.predict(prepare(test)),
})
sub.to_csv("submission.csv", index=False)

Check the competition's Data tab for the exact columns it wants. For Titanic that is passenger id and survived. In the notebook, use Save Version, wait for it to finish, then submit the output file from the notebook's Output section or the competition's Submit button. Your score appears on the leaderboard in a short time.

Do not worry about your rank on a first try. The aim is a complete loop: data in, model, file out, score back.

Make the second try better

  • Change one thing at a time. Add a feature, such as the title in the passenger's name, then re-run cross-validation. Keep a note of each score.
  • Trust cross-validation over the leaderboard. Pushing for a leaderboard bump on a small test set teaches you to overfit it.
  • Read other people's notebooks. Open the Code tab, sort by most votes and read the ones that explain their choices.
  • Write up your own. A short notebook with a clear story is portfolio material.

Next, try a project where the metric is money, as in mobile money fraud detection. When a model works, learn to ship it by deploying it as an API with FastAPI. For the bigger picture of what to build, see data science portfolio projects.

If you want mentors, deadlines and a capstone, see the Data Science to AI Engineering programme: 5 months full time or 8 months part time, KES 140,000, starting 11 January 2027.

Key Takeaways

  • ✓Your first Kaggle goal is a full loop: data, model, submission, score.
  • ✓Titanic is a practice field. Move to local data once the routine is easy.
  • ✓Trust cross-validation over the public leaderboard.
  • ✓Change one thing at a time and write down each score.

Frequently Asked Questions

Is Kaggle free?
Joining, using notebooks and entering starter competitions like Titanic cost nothing. Check the Kaggle site for current limits on notebook computing time.
Do I need a powerful laptop for Kaggle?
No. Notebooks run in the browser on Kaggle's machines, so a basic laptop and a steady connection are enough.
Which competition should a beginner enter first?
The Titanic starter competition. It is small, has the simplest submission format and has many worked examples to compare with.
Will a good Kaggle rank get me a job?
No school or site can promise a job. A clear notebook that explains your choices is useful in an interview, more than a rank.

Learn data science on African data

KES 140,000

Data Science to AI Engineering: 5 months full time or 8 months part time, hybrid in Nairobi. Fraud, credit and M-Pesa data from Week 1, and every model deployed. Starts 11 January 2027.

See the Data Science programme

Need it live by next month? Our studio builds it

Related guides

  • Python for Data Science: Your First 30 Days
  • Data Engineering Basics: Build a Pipeline with Airflow and Docker
  • Data Science Roadmap for Beginners: 6 Months, Week by Week

Keep reading

Kenyan Open Datasets: Where to Find Real Data to Practise On

Where to find real Kenyan data for practice projects: eight sources, what each holds, the file format and the date we opened it.

Read more

Catching Mobile Money Fraud with Machine Learning

A fraud model on the public PaySim dataset, judged in shillings lost and wasted alarms rather than a single accuracy score.

Read more

Deploy a Machine Learning Model as an API with FastAPI

From a trained model file to a working API: save, serve, test with curl and put it in a Docker container, in four short steps.

Read more

Data Science Portfolio Projects That Get Interviews in Kenya

Five portfolio projects on African data, each with a question, a dataset and a deliverable, plus how to package them with a README, a live demo and a write-up.

Read more

Explore related topics

Breaking Into Tech

Practical, no-nonsense guides for anyone looking to start or change their career in tech. From choosing your first language to acing interviews.

Tech Salary Data

Transparent salary data for tech roles in Africa and worldwide, updated regularly with real market research.

AI Skills & Tools

Practical AI knowledge for developers. Build your first agent, get good at RAG, and pick the right AI coding tools for real work.

Bonaventure Ogeto

Bonaventure Ogeto

Founder and CEO, Mctaba Labs

Software engineer for 8+ years. He runs a Nairobi studio that ships products on M-Pesa, WhatsApp and AI, and teaches what the studio ships. He holds a BSc in Mathematics and Computer Science.

More about the author