Data Wrangling with Python and R Training Course

Duration 10 days 20 modules · 65 contact hours
Level Intermediate Certificate on completion
Who attends Data Analyst, Business Intelligence Analyst and others
Fee from USD 2,200 KSh 190,000 for Kenyan organisations
Where 52 cities + online See dates by city
Next start 16 Nov 2026 Course code SD-DA-104

Before you join: Participants should be comfortable working with tabular data and should have basic prior experience in either Python or R.

Dates & prices

Two start dates a month in every city, and live online on weekdays or weekends. Fees are per participant; classroom fees include tuition, materials, lunch and refreshments, and the certificate.

Suggest a date or city

Showing the next six months. Later dates, other cities and private deliveries for your team are available on request.

Course overview

Operational, financial, customer and programme data rarely arrive ready for analysis. Files contain inconsistent identifiers, missing values, malformed dates, duplicate records, shifting category labels and incompatible schemas. Analysts need to turn these sources into trustworthy datasets while retaining evidence of what changed, why it changed and whether the result reconciles to the source.

This 10-day instructor-led course develops advanced data wrangling capability in Python and R. Participants use pandas, tidyverse tools and related libraries to import, profile, clean, reshape, join, validate and publish structured data. The course covers CSV, Excel, JSON, Parquet, SQL extracts and REST API responses; text and regular-expression processing; date and timezone handling; missing-data decisions; fuzzy matching; data-quality assertions; scalable processing; reproducible pipelines; and privacy-aware handling of sensitive fields.

Teaching combines concise technical briefings with case-based data work, group review and guided build sessions. Participants work with realistic datasets such as transaction records, customer master data, programme monitoring extracts and operational logs. By the end of the course, each participant produces a documented source-to-output wrangling pipeline in Python or R, supported by a data dictionary, validation log, reconciliation evidence and an analysis-ready dataset. Delivery is available in classrooms in more than 50 cities or live online. Training days run from 08:30 to 16:30, providing approximately 6.5 contact hours per day.

The course suits analysts and technical professionals who already write basic Python or R code and need dependable methods for preparing data used in reporting, modelling, audit, research or operational decision-making.

What you will be able to do

  • Build reproducible Python and R data-wrangling projects using controlled environments and versioned code
  • Import CSV, Excel, JSON, Parquet, SQL and API data with explicit schemas and provenance
  • Transform messy datasets using pandas, dplyr, tidyr, data.table and vectorised operations
  • Apply missing-data, outlier, text-cleaning and date-validation methods with documented assumptions
  • Join and reconcile multi-source datasets using key analysis, cardinality checks and exception tables
  • Design data-quality rules for completeness, uniqueness, validity, consistency and timeliness
  • Automate parameterised data pipelines with logging, testing, configuration and publication controls
  • Present a documented analysis-ready dataset, validation report and reproducible transformation pipeline

Benefits of attending

For you

  • Produce analysis-ready datasets with visible cleaning and validation evidence
  • Diagnose join failures before they distort totals and reporting metrics
  • Write reusable transformation functions instead of repeated spreadsheet corrections
  • Document data assumptions clearly for audit, peer review and hand-off
  • Build a portfolio-quality Python or R wrangling pipeline

For your organisation

  • Reduce reporting errors caused by duplicate, unmatched and misclassified records
  • Shorten preparation time for recurring operational and financial data feeds
  • Create traceable data-quality controls for audit and governance requirements
  • Improve consistency between analyst-produced datasets and published business metrics
  • Retain reusable code, validation rules and data dictionaries after the course

Course modules

20 modules over 10 days

Participants can establish a controlled Python and R project environment for repeatable data work.

  • Python virtual environments and R projects for reproducible analysis setups
  • Jupyter notebooks and Quarto documents for executable analytical records
  • Project directories separating raw, interim, processed data and source code
  • UTF-8 encoding, locale settings, and newline conventions diagnosed early
  • Package versions recorded with requirements files and renv lockfiles
  • Git commits structured around discrete transformation changes

Participants can inspect tabular datasets and identify structural issues before transformation.

  • pandas DataFrame indexing and R tibble semantics compared
  • Inspecting shape, dtypes, classes, memory use, and cardinality
  • Vectorised operations replace row-wise loops in both languages
  • Boolean masks and dplyr filters express compound selection rules
  • Column names standardised using snake_case naming conventions
  • Type coercion failures isolated before downstream transformations

Participants can import common business data formats with controlled parsing rules and schemas.

  • CSV parsing controlled with delimiters, quoting, headers, and encodings
  • read_csv and pandas read_csv configured with explicit column types
  • Excel workbooks imported from selected sheets, ranges, and headers
  • JSON records normalised from nested objects into tabular fields
  • Parquet files selected for typed, columnar analytical storage
  • Malformed records quarantined with source-file and row-number evidence

Participants can build readable transformation pipelines that convert business rules into code.

  • Tidy data principles map variables, observations, and values consistently
  • Pipeline verbs filter, mutate, arrange, select, and summarise records
  • Method chains retain readable transformation order and intermediate intent
  • Reusable functions parameterise repeated cleaning rules and assumptions
  • Grouped aggregations calculate counts, rates, quantiles, and weighted means
  • Business rules translated into transparent transformation specifications

Participants can profile data-quality issues and apply defensible treatments for missing and anomalous values.

  • Missingness profiles distinguish nulls, blanks, sentinels, and absent rows
  • MCAR, MAR, and MNAR assumptions assessed before imputation
  • Rule-based imputation separated from analytical estimation and prediction
  • Forward fill, backward fill, and interpolation applied with safeguards
  • Outliers flagged using IQR fences, z-scores, and domain thresholds
  • Cleaning decisions documented in a data-quality issue log

Participants can standardise text fields and extract usable values from semi-structured descriptions.

  • Regular expressions extract identifiers, amounts, dates, and coded fields
  • stringr and pandas string methods standardise text values
  • Unicode normalisation resolves accented characters, symbols, and compatibility forms
  • Whitespace, punctuation, and case rules prepared for matching
  • Named capture groups parse semi-structured operational descriptions
  • Text transformations tested against edge cases and malformed inputs

Participants can parse, validate and derive reporting periods from date and timestamp data.

  • ISO 8601 parsing distinguishes dates, times, durations, and intervals
  • Timezone-aware timestamps converted without losing local business meaning
  • lubridate and pandas datetime methods derive reporting periods
  • Fiscal calendars map transactions to accounting weeks and quarters
  • Duplicate timestamps and daylight-saving transitions handled explicitly
  • Date validation tests identify impossible sequences and future records

Participants can combine datasets safely and identify unmatched or duplicated records.

  • Primary keys, natural keys, and surrogate keys assessed for reliability
  • One-to-one, one-to-many, and many-to-many joins diagnosed before merging
  • Join cardinality checks prevent duplicated revenue, customer, or transaction totals
  • Anti-joins identify unmatched records requiring remediation or exception handling
  • Fuzzy matching combines blocking keys with similarity-score thresholds
  • Master-data crosswalks preserve source identifiers and match confidence

Participants can reshape reporting extracts, survey data and nested records into usable tables.

  • Pivot longer and pivot wider reshape reporting extracts predictably
  • Multi-value columns separated using delimiters, positions, and regular expressions
  • Nested JSON arrays exploded while retaining parent record identifiers
  • Wide survey responses converted into analysis-ready respondent-level tables
  • Hierarchical headers reconstructed into usable variable names
  • Reshaping steps preserve record counts and aggregation grain

Participants can assemble an initial end-to-end pipeline for a cleaned operational dataset.

  • Source-to-output pipeline assembles a cleaned operational dataset
  • Data dictionary defines fields, units, permitted values, and ownership
  • Reconciliation totals compare transformed outputs with source control totals
  • Exception tables isolate rejected records and stated failure reasons
  • Functions organise ingestion, cleaning, validation, and publication stages
  • Peer review examines assumptions, readability, and reproducibility evidence

Participants can standardise categories and apply controlled mappings to inconsistent source values.

  • Categorical levels harmonised across systems using controlled value mappings
  • Reference tables replace hard-coded categories and business labels
  • Frequency profiling reveals rare levels, misspellings, and category drift
  • Regular expressions classify free-text records into reporting categories
  • Rule precedence resolves overlapping classification conditions explicitly
  • Mapping coverage measured with matched, unmatched, and ambiguous rates

Participants can design and automate data-quality checks that detect transformation failures.

  • Validation rules specify completeness, uniqueness, validity, consistency, and timeliness
  • Assertion-based checks test expected values before dataset publication
  • Schema checks enforce expected columns, types, ranges, and nullability
  • Referential integrity tests compare foreign keys with approved dimensions
  • Unit tests protect transformations against regressions after source changes
  • Quality metrics published as pass rates, exceptions, and trend counts

Participants can retrieve, flatten and control data from SQL queries and REST APIs.

  • Parameterized SQL retrieves only required fields and filtered records
  • Window functions calculate rankings, lags, and partitioned running totals
  • REST API requests handle pagination, authentication, retries, and rate limits
  • JSON responses flattened into typed tables with provenance fields
  • Incremental extraction uses watermark timestamps and idempotent loading logic
  • API failures logged with status codes, payload context, and retry outcomes

Participants can select efficient processing methods for datasets that strain desktop memory and runtime.

  • Chunked CSV processing handles files exceeding available memory
  • Arrow and Parquet reduce storage size and read times
  • data.table and pandas operations profiled for bottlenecks
  • Vectorisation, joins, and grouping choices benchmarked on representative data
  • Memory copies identified when selecting, assigning, and concatenating tables
  • Partitioned datasets support selective reads by date or business unit

Participants can automate recurring transformations and retain execution evidence for review.

  • Parameterized scripts separate configuration values from transformation code
  • Quarto reports combine code, outputs, narrative, and source references
  • Command-line arguments support scheduled runs for recurring data feeds
  • Logging records row counts, warnings, runtime, and transformation milestones
  • Error handling stops publication when critical validation rules fail
  • Git branches and pull requests support reviewed pipeline changes

Participants can exchange data and selected functions between Python and R workflows.

  • reticulate calls Python libraries from R analytical workflows
  • rpy2 exposes R functions within Python-driven processing scripts
  • Parquet exchange preserves types better than comma-separated files
  • Shared data contracts align field definitions across language boundaries
  • Package environments isolated so Python and R dependencies remain reproducible
  • Tool selection considers library maturity, team skills, and deployment constraints

Participants can apply practical controls for sensitive data, provenance and retention during wrangling.

  • Personally identifiable information classified before extraction and transformation
  • Data minimisation removes fields unnecessary for defined analytical purposes
  • Hashing and tokenisation compared for pseudonymising stable identifiers
  • Role-based access rules applied to raw and processed datasets
  • Provenance records source, transformation, owner, and publication date
  • Retention rules flag extracts requiring deletion or restricted storage

Participants can prepare documented datasets that analysts, modellers and reporting teams can use confidently.

  • Analysis-ready tables define grain, measures, dimensions, and observation windows
  • Feature engineering derives ratios, lags, cohorts, and rolling measures
  • Denominator checks prevent misleading rates and percentage calculations
  • Sampling frames assessed for duplicates, exclusions, and population coverage
  • Visual profiling uses distributions, missingness plots, and relationship checks
  • Hand-off datasets include metadata, quality results, and known limitations

Participants can define a controlled wrangling solution from requirements through acceptance criteria.

  • Requirements translated into source inventory, transformation map, and acceptance criteria
  • Stakeholder questions prioritised against available data and quality constraints
  • Pipeline architecture selects ingestion, storage, validation, and output stages
  • Review checklists test correctness, auditability, maintainability, and privacy
  • Technical findings communicated through exception summaries and data dictionaries
  • Capstone scope fixed using realistic source files and delivery criteria

Participants can build, review and present a complete documented pipeline that converts messy source data into a validated analysis-ready dataset.

  • Complete pipeline ingests, cleans, validates, joins, and publishes source data
  • Python or R implementation documents assumptions, dependencies, and execution steps
  • Quality report quantifies exceptions, reconciliation results, and unresolved risks
  • Peer review tests logic, reproducibility, performance, and data protection controls
  • Presentation explains design choices, findings, limitations, and hand-off requirements
  • Final package includes code, data dictionary, validation log, and output dataset

Exercises and examples are adapted to each cohort's sectors and roles.

What you take back to work

  1. Reusable source-to-output pipeline template
  2. Data-quality rules checklist
  3. Data dictionary template
  4. Join and reconciliation control model
  5. Transformation decision log
  6. Capstone validation report

Who should attend

  • Data Analyst — prepares reliable datasets for reporting, dashboards and statistical analysis
  • Business Intelligence Analyst — reconciles operational extracts before producing management metrics
  • Data Scientist — improves source-data quality before feature engineering and model development
  • Financial Analyst — cleans transaction, ledger and planning data for controlled analysis
  • Monitoring and Evaluation Specialist — prepares survey and programme records for defensible reporting
  • Data Engineer — prototypes transformation logic and validation rules with analytical teams

Skills and tools covered

Data cleaning pipelinesSchema validationRecord linkageText and date parsingReproducible reportingData quality assurance

Tools and standards

Python, R, pandas, tidyverse

How the course runs

Training methodology

The course uses short instructor briefings followed by guided work on realistic messy datasets. Participants inspect source files, define transformation rules, write Python or R code, compare outputs and review each other's logic. Cases include customer records, transaction extracts, survey data and operational feeds. Group discussions focus on assumptions, data-quality risks, reconciliation and hand-off requirements. Participants progressively assemble a source-to-output pipeline, then test, review and present it during the final capstone.

Requirements and prerequisites

Participants should be comfortable working with tabular data and should have basic prior experience in either Python or R. This includes creating variables, using simple functions, reading a CSV file and working with lists or tables. Familiarity with spreadsheets, relational data concepts and basic descriptive statistics is useful. Participants do not need advanced programming, database administration, machine-learning experience or prior knowledge of both languages. The course introduces equivalent approaches in Python and R, although participants should expect to work primarily in one chosen language.

A typical training day

08:30 – 10:30First session
10:30 – 10:45Refreshment break
10:45 – 12:30Second session
12:30 – 13:30Lunch and networking
13:30 – 15:00Third session
15:00 – 15:15Refreshment break
15:15 – 16:30Workshop and daily review

Live online deliveries follow the same structure in East Africa Time, with shorter screen blocks and longer breaks.

What the fee includes

  • Instruction by a practitioner facilitator
  • Full course workbook and materials
  • Exercise files, templates and case studies
  • Refreshments and lunch on classroom deliveries
  • Certificate of completion
  • Post-course application plan

Frequently asked questions

You should be able to read a CSV file, create variables and use basic functions in at least one language. You do not need advanced programming or prior experience in both Python and R.

Bring a laptop capable of running Python or R and a current web browser. Installation guidance can be provided before the course, and participants may bring non-sensitive examples of their own data challenges.

It is designed for analysts, BI professionals, data scientists, financial analysts, M&E specialists and data engineers who prepare data for analysis. It is not intended as a first programming course.

The course concentrates on preparing trustworthy datasets rather than introductory coding, statistical modelling or dashboard design. Participants focus on cleaning, joining, validating, documenting and automating data transformations.

Participants can apply the methods to recurring reporting extracts, customer records, transaction data, survey files and API feeds. The templates and pipeline structure are intended for adaptation to local data sources and controls.

The first part establishes core transformation methods and builds an initial working pipeline. The second part covers validation, automation, scale, privacy and hand-off, ending with a capstone build, review and presentation.

Questions about this course?

Ask about dates, fees, group bookings or running it for your team. Our training team replies by email.