Skip to Main Content
Data Science Fundamentals with R, Python, and Open Data
book

Data Science Fundamentals with R, Python, and Open Data

by Marco Cremonini
April 2024
Beginner to intermediate content levelBeginner to intermediate
480 pages
12h 22m
English
Wiley
Content preview from Data Science Fundamentals with R, Python, and Open Data

11List/Dictionary Data Format

The data format called list in R or dictionary in Python, usually shortened as dict, has a long history in the management of data, being one of the simpler but useful evolutions of basic data formats like arrays and matrices. Arrays and matrices by definition have data of the same type, and the most reasonable evolution is to have data formats that allow for data of different types. We have already seen this throughout the whole book with the data frame format, which basically extends the notion of a matrix with columns (variables) possibly of different types. The list/dict data format follows the same logic but is realized in an alternative way with respect to the data frame, with different pros and cons. The following is an example of a list/dict data structure describing personal information:

This is a typical form of a list/dict (technically, it uses Python syntax), with information expressed as pairs name:value (sometimes also called key:value or label:value) and organized in a highly structured ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Python and R for the Modern Data Scientist

Python and R for the Modern Data Scientist

Rick J. Scavetta, Boyan Angelov

Publisher Resources

ISBN: 9781394213245Purchase Link