Command Palette

Search for a command to run...

Hectal
Back to the lesson: Topic 14.10 — The Wider Data Ecosystem
Python · Example 1 of 2

Row layout against column layout

Add a fourth record and print columns again. Notice that the column layout needs one list append per field.

NumPy and pandas are the base, but real data work also uses Polars and DuckDB for big tables, Apache Arrow and Parquet for fast storage, and Jupyter notebooks for exploration. Underneath PyTorch and scikit-learn, NumPy-style arrays are still the language.

Change the code and press Run (Ctrl+Enter). Predict what will happen first, then break it on purpose and read what changes. Your edits are saved and match the lesson page.

Ready for more? This phase has 6 hands-on exercises with automatic checks.

Practice questions

Write the code in the editor, run it, then open the model answer to compare.

01

Make the column layout of the rows [{"a": 1, "b": 2}, {"a": 3, "b": 4}] and print it.

02

Write the SQL (as text) that gives the number of rows per city from a table weather.

03

List which tools you would use for a 30 GB set of Parquet files that you want to summarise with SQL.

Explain it without notes

01

What are the limits of pandas, and what would you try first when a file is too big?

02

Why is Parquet better than CSV for analytics?

03

What are Polars and DuckDB, and when would you choose each?

04

What is the right role for a Jupyter notebook in a professional project?

Row layout against column layout
Sign in to run this example in your browser.

Expected output

row layout   : {'city': 'Pune', 'temp': 31.5}
column layout: {'city': ['Pune', 'Delhi', 'Pune'], 'temp': [31.5, 18.0, 29.5]}
mean temp reads one column only: 26.333333333333332