Created get_col method with tests and tutorial.rst update

Useful when you have multiple columns with the same header
This commit is contained in:
Mark Walling
2011-07-11 17:13:47 -04:00
parent cd5aa4fc06
commit e74a8f41cc
3 changed files with 29 additions and 1 deletions
+7
View File
@@ -146,6 +146,13 @@ To do so, we access the :class:`Dataset` as if it were a standard Python diction
>>> data['First Name']
['Kenneth', 'Bessie']
You can also access the column using its index. ::
>>> d.headers
['Last Name', 'First Name', 'Age']
>>> d.get_col(1)
['Kenneth', 'Bessie']
Let's find the average age. ::
>>> ages = data['Age']