Skip to content

Commit

Permalink
add another way to extract row as a vector
Browse files Browse the repository at this point in the history
  • Loading branch information
bkamins committed Jun 2, 2018
1 parent 9ab6cc5 commit aa7a4ba
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
26 changes: 24 additions & 2 deletions 06_rows.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"metadata": {},
"source": [
"# Introduction to DataFrames\n",
"**[Bogumił Kamiński](http://bogumilkaminski.pl/about/), Apr 21, 2018**"
"**[Bogumił Kamiński](http://bogumilkaminski.pl/about/), Jun 2, 2018**"
]
},
{
Expand Down Expand Up @@ -1195,6 +1195,28 @@
"source": [
"Tuple(x[1, col] for col in cols) # similar construct for Tuples, when ported to Julia 0.7 NamedTuples will be added"
]
},
{
"cell_type": "code",
"execution_count": 40,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"2-element Array{Any,1}:\n",
" 1 \n",
" \"a\""
]
},
"execution_count": 40,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"vec(Matrix(x[1, cols])) # also you can use a conversion to a Matrix"
]
}
],
"metadata": {
Expand All @@ -1207,7 +1229,7 @@
"file_extension": ".jl",
"mimetype": "application/julia",
"name": "julia",
"version": "0.6.2"
"version": "0.6.3"
}
},
"nbformat": 4,
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@ Changelog:

1. Improved rendering of `#undef` in HTML/LaTeX.
2. Added `permutecols!` function.
3. `describe` returns a `DataFrame`
4. On Julia 0.7 you can access columns of `DataFrame` using `.` notation

0 comments on commit aa7a4ba

Please sign in to comment.