Namedtuples are immutable just like regular tuples. Once you store something in them you can’t modify it.
Namedtuples are, well…named tuples. Each object stored in them can be accessed through a unique (human-readable) identifier. This frees you from having to remember integer indexes, or resorting to workarounds like defining integer constants as mnemonics for your indexe
Methods added in the repo:
-
dict_approach: method runs for 10k iteration for different fake profiles and returns
the most common bloodgroup,
mean current location,
oldest person age
and the average age.This method is executed using Dictionary approach.
-
namedtuple_approach: method runs for 10k iteration for different fake profiles and returns
the most common bloodgroup,
mean current location,
oldest person age
and the average age.
This method is executed using namedtuple approach.
- stock comparison
using namedtuple generate 100 companies from pyfake library and create a random dataset for high, close and open of stock value. return - max-high stock price, open-stock price and close-stock price.