Skip to content

Instantly share code, notes, and snippets.

@tfolkman
Last active October 25, 2019 04:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tfolkman/28af6bba04e37d7ebc385de56fc02e9c to your computer and use it in GitHub Desktop.
Save tfolkman/28af6bba04e37d7ebc385de56fc02e9c to your computer and use it in GitHub Desktop.
NamedTuple
from collections import namedtuple
Features = namedtuple('Features', ['age', 'gender', 'name'])
row = Features(age=22, gender='male', name='Alex')
print(row.age)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment