Skip to content

Commit

Permalink
add Dataset.get
Browse files Browse the repository at this point in the history
  • Loading branch information
yoonthegoon committed Aug 2, 2023
1 parent b7fa506 commit 7dcd214
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docs/tutorial.rst
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,13 @@ You can slice and dice your data, just like a standard Python list. ::

>>> data[0]
('Kenneth', 'Reitz', 22)
>>> data[0:2]
[('Kenneth', 'Reitz', 22), ('Bessie', 'Monke', 20)]

You can also access a row using its index without slicing. ::

>>> data.get(0)
('Kenneth', 'Reitz', 22)

If we had a set of data consisting of thousands of rows,
it could be useful to get a list of values in a column.
Expand Down

0 comments on commit 7dcd214

Please sign in to comment.