internalsGet Pro

Data Engineering · Module 03

Python for data engineering

Lessons
10
Free
0
Reading
~3 h

Your progress

0 / 10 lessons done

Sign in to track

Lessons

  1. The Python data toolkit: libraries that matterAlmost every data team writes Python around its SQL: scripts that call APIs, read files, run checks and move tables between tools. Picking one library per job, and keeping the heavy work out of Python loops, decides whether that script finishes on time and stays easy to review.12 min
  2. Reading and writing CSV, JSON and Parquet in PythonMost pipelines start and end with files: a partner’s CSV, an API’s JSON, a Parquet copy for another team. The bugs live in the space between the bytes and the types, and they load without an error.14 min
  3. DataFrames: pandas and PolarsPipeline code, notebooks and ML libraries pass data around as DataFrames. Knowing what a DataFrame does with your rows, and where its rules differ from SQL, keeps a quick Python step from quietly changing a number.14 min
  4. Pulling data from APIs: pagination and rate limitsPayment providers, ad platforms and CRMs hand out their data only through APIs, a page at a time and at their own pace. A loop that ignores either rule either crashes at night or quietly loads the wrong numbers.15 min
  5. Reading and writing databases from PythonAlmost every extract job is Python talking to a database: open a connection, ask for rows, hand them to the destination. The defaults that work on a test table run out of memory, lose their connection or crawl once the table holds a night of real data.16 min
  6. Processing data larger than memorySooner or later a pipeline has to read more data than its server can hold: a year of history for a model, a backfill, a rebuild after a bug. Knowing what actually has to fit in memory decides whether that job runs on the server you have or needs a cluster.16 min
  7. Errors, retries and logging in pipeline codeEvery nightly job meets a dropped connection or a busy server sooner or later. Whether that costs a few seconds or a morning of reports depends on what the code retries, what it stops on and what it writes down.16 min
  8. Testing data code with pytestPipeline code gets changed in a hurry, often an hour before a report is due. A suite of tests that runs in seconds is what keeps each quick fix from quietly undoing an older one.17 min
  9. Packaging pipelines: config, dependencies and DockerA pipeline script runs on a machine you don’t log in to, at a time nobody watches. Whether it gives the same answer after a server rebuild depends on what you pinned and packaged, not on the code alone.16 min
  10. Design: a script that loads daily sales filesPartners, banks, couriers and marketplaces still send data as daily files. A loader for them looks like ten lines of Python, and most of the real work is deciding when a file is complete, what it replaces, and what happens when it is wrong.28 min

Practise with

No tools or paper guides for this module yet.

Terms this module teaches 35

Open glossary

Apache Arrow

A standard layout for columnar data in memory, the same in every programming language, so programs can share tables without converting each value.