DataCareerHub
Explore learning
← Practice challengesFree companion · 15 minute suggested activity

Create a reproducibility fingerprint

Python practice · Python 3.10+ standard library · Run locally in a folder containing the supplied files.

Learn → Try → ExplainReviewed 2026-10-15
01

Your task

Fingerprint the input so another learner can identify the exact file you used. Explain the expected output before running the code.

02

Hint

Read with csv.DictReader so column names are explicit. CSV values are strings until converted. Keep parsing failures visible.

Worked solution

The digest depends on the exact bytes, including line endings. Save it beside your command, tool version and result. A digest proves byte identity, not data accuracy.

import csv
with open('retail-orders.csv',newline='',encoding='utf-8') as f:
    rows=list(csv.DictReader(f))
import hashlib
from pathlib import Path
p=Path('retail-orders.csv')
print(hashlib.sha256(p.read_bytes()).hexdigest())
04

Extend the test

Change one input in a disposable copy and predict which check should fail. Restore the original before comparing results.

Make the reasoning yours.

Try the activity before reading its reference. Keep your sources, commands and assumptions with your work. Companion activities are unsaved self-practice and do not award a certificate or change lesson progress.

Resume guidance and examples are for learning and preparation only. They do not guarantee interviews, a job offer or employment.

Public registration, payments and new paid enrolment remain disabled. These free resources do not grant access to protected course modules.

Learner dashboard ↗ · Ask a question ↗