Compare industry employment, hours and earnings in Python

Compare manufacturing and professional/business services before 2020 and through 2025, using payroll jobs, paid hours and average earnings.

Compare employment recovery and earnings across industries

You are preparing an industry brief and want to see how employment recovered after 2020, alongside changes in hours and pay. This example compares manufacturing with professional and business services in December 2019, December 2020 and December 2025, using national Bureau of Labor Statistics Current Employment Statistics (CES) estimates.

The optional input.csv contains those two real industry selections. The same codes appear in the industries list in the Python code below. No observations are invented.

Download monthly_observations.csv into your working folder. It contains 576 genuine rows from the paid table: both industries, all months of 2019, 2020 and 2025, all four measures, both adjustment choices and all 26 columns. The full $29 download has 1,513,332 monthly observations, plus annual estimates, definitions and coverage tables. Employment mostly starts in 1990; all-employee hours and earnings start in March 2006. Inspect the full coverage and fields.

Code example

The code uses Python’s standard library and runs in a notebook cell, IPython or a script. It selects seasonally adjusted (S) estimates and prints payroll employment in thousands of jobs, employment change since December 2019, average paid weekly hours, and nominal hourly and weekly earnings. Replace the industry list to compare other groups in the full file.

Paths are relative to your working folder; use from pathlib import Path; print(Path.cwd()) to check it, or supply full paths.

Python 3.10+ · Jupyter, IPython or a script
import csv
from decimal import Decimal

# These are genuine CES industry selections, also supplied in example_input.csv.
industries = [
    {'industry_code': '30000000', 'label': 'Manufacturing'},
    {'industry_code': '60000000', 'label': 'Professional and business services'},
]
wanted = {row['industry_code'] for row in industries}
observations = {}
with open('monthly_observations.csv', newline='', encoding='utf-8') as file:
    for row in csv.DictReader(file):
        if (row['industry_code'] in wanted and row['seasonal'] == 'S'
                and row['month'] in {'2019-12', '2020-12', '2025-12'}):
            key = (row['industry_code'], row['month'], row['measure_code'])
            if key in observations:
                raise ValueError(f'Duplicate observation: {key}')
            observations[key] = row

results = []
for industry in industries:
    code = industry['industry_code']
    baseline = observations.get((code, '2019-12', '01'))
    for month in ['2019-12', '2020-12', '2025-12']:
        required = [(code, month, measure) for measure in ('01', '02', '03', '11')]
        if baseline is None or any(key not in observations for key in required):
            results.append({'industry': industry['label'], 'month': month,
                            'jobs_thousands': 'selection_not_found',
                            'jobs_change_since_2019_pct': '', 'weekly_hours': '',
                            'hourly_earnings_usd': '', 'weekly_earnings_usd': ''})
            continue
        base = Decimal(baseline['value'])
        jobs = Decimal(observations[(code, month, '01')]['value'])
        growth = (jobs / base - 1) * 100
        results.append({
            'industry': industry['label'], 'month': month,
            'jobs_thousands': str(jobs),
            'jobs_change_since_2019_pct': f'{growth:.1f}',
            'weekly_hours': observations[(code, month, '02')]['value'],
            'hourly_earnings_usd': observations[(code, month, '03')]['value'],
            'weekly_earnings_usd': observations[(code, month, '11')]['value'],
        })
for row in results:
    if row['jobs_thousands'] == 'selection_not_found':
        print(f"{row['industry']} | {row['month']} | selection_not_found")
        continue
    print(f"{row['industry']} | {row['month']} | {row['jobs_thousands']} thousand jobs | "
          f"{row['jobs_change_since_2019_pct']}% vs Dec 2019 | {row['weekly_hours']} hours/week | "
          f"${row['hourly_earnings_usd']}/hour | ${row['weekly_earnings_usd']}/week")

Analysis of the output

Manufacturing | 2019-12 | 12760 thousand jobs | 0.0% vs Dec 2019 | 40.5 hours/week | $28.14/hour | $1139.67/week
Manufacturing | 2020-12 | 12153 thousand jobs | -4.8% vs Dec 2019 | 40.2 hours/week | $28.99/hour | $1165.40/week
Manufacturing | 2025-12 | 12580 thousand jobs | -1.4% vs Dec 2019 | 40.0 hours/week | $36.08/hour | $1443.20/week
Professional and business services | 2019-12 | 21467 thousand jobs | 0.0% vs Dec 2019 | 36.1 hours/week | $34.27/hour | $1237.15/week
Professional and business services | 2020-12 | 20770 thousand jobs | -3.2% vs Dec 2019 | 36.7 hours/week | $35.47/hour | $1301.75/week
Professional and business services | 2025-12 | 22372 thousand jobs | 4.2% vs Dec 2019 | 36.5 hours/week | $44.96/hour | $1641.04/week

Manufacturing employment falls from 12.760 million jobs in December 2019 to 12.153 million in December 2020. By December 2025 it reaches 12.580 million, still 1.4% below the 2019 level. Professional and business services also falls in 2020, but reaches 22.372 million jobs by December 2025, 4.2% above December 2019. The two industries therefore show different employment paths over the same comparison periods.

Manufacturing’s average hourly earnings rise from $28.14 to $36.08 while average paid weekly hours fall from 40.5 to 40.0. Professional and business services has higher hourly earnings in these observations, with weekly hours rising from 36.1 to 36.5. These are current-dollar averages across employees. They do not measure inflation-adjusted purchasing power or the raise received by a fixed group of workers; a change in the mix of jobs can also move an average.

The code compares the same industry, measure and adjustment. It keeps an unavailable selection visible as selection_not_found and rejects duplicate selected industry/month/measure keys. The full table uses series_id + year + period as its unique key, so the other adjustment and measures remain legitimate separate rows.

Choose the right industry comparison

CES measures payroll employment, paid hours and earnings. Use industry JOLTS to examine openings, hiring and separations, industry occupational wages for occupational staffing and pay, or county employment and wages for local industry estimates. These sources have different populations and industry groupings; a companion link does not establish interchangeable measures.

Choose business and labor data for your question →

Using the full dataset

Extract the purchased ZIP and replace the sample with its complete monthly_observations.csv. The code runs unchanged against the full 1,513,332 rows. Select measure 01 for payroll employment, 02 for average weekly hours, 03 for average hourly earnings, or 11 for average weekly earnings. U selects unadjusted estimates. Keep the industry and series IDs as text.

Employment history begins in January 1990 for most of 850 groups; ten groups begin in 2001. Hours and earnings begin in March 2006 for 549 private-industry groups. Not every industry has both adjustment choices or all four measures. coverage.csv lists every selected series/year, including years with no estimates. An absent observation is not zero.

The industry directory includes overlapping totals and subgroups, with original names, NAICS expressions and display levels. Do not sum all 850 groups. Employment counts jobs on payroll rather than unique people, and hours measure paid hours. Earnings exclude benefits, irregular bonuses and retroactive pay.

annual_observations.csv retains 61,783 published unadjusted M13 estimates. Employment is a monthly average. Annual weekly hours are employment-weighted, annual hourly earnings are hours-weighted, and annual weekly earnings combine annual hours and hourly earnings. Do not substitute an ordinary monthly mean for every measure. Annual hours and earnings begin in 2007.

series.csv preserves 4,986 source definitions and footnotes, industries.csv preserves 850 industry records, and source_accounting.csv reconciles all 8,381,987 original bulk rows by series and inclusion/exclusion reason. The monthly table also includes exact prior-month and prior-year differences where those observations exist in the delivered history. These comparisons do not establish statistical significance.

For state comparisons, State Industry Employment, Hours & Earnings History provides the 50 states and DC. Its Python guide connects annual manufacturing jobs with state GDP. National and state CES estimates have different coverage; state sums need not reproduce national totals.

Sources and versions

Source: BLS national CES bulk files captured November 4, 2026; the main file was last modified October 14. The source includes partial 2026 observations, but this edition ends with the complete calendar year 2025. It is a revised historical snapshot, not original monthly publication vintages.

The CES concepts, calculation methods and frequently asked questions describe the measures. The retained series use BLS’s NAICS 2022 classifications and historical reconstructions. ACD preserves that published history; it does not independently harmonize classifications or restore discontinued series.

Your one-time purchase includes processing improvements and documented publisher error corrections to this edition. New periods or genuinely new source editions may be sold separately; routine benchmarking is not automatically an error correction. There is no membership or automatic-refresh promise. The government source data are free; ACD sells preparation, documentation, validation and delivery. Read the preparation record.

Example checked November 4, 2026 against both these samples and the complete purchased files. Source and processing records, sample checksums · Expected result CSV. Independent preparation; no agency endorsement.