June 2019
Beginner to intermediate
770 pages
19h 24m
English
An ideal mapping is between the NamedTuple instances and rows in a CSV file. Each row represents a different NamedTuple. Consider the following Python class definition:
from typing import NamedTupleclass GameStat(NamedTuple): player: str bet: str rounds: int final: float
We've defined the objects in this application to have a simple, flat sequence of attributes. The Database architects call this First Normal Form. There are no repeating groups and each item is an atomic piece of data.
We might produce these objects from a simulation that looks like the following code:
from typing import Iterator, Typedef gamestat_iter( player: Type[Player_Strategy], betting: Type[Betting], limit: int = 100) -> Iterator[GameStat]: ...
Read now
Unlock full access