Skip to content

Commit aa7a4ba

Browse files
committed
add another way to extract row as a vector
1 parent 9ab6cc5 commit aa7a4ba

File tree

2 files changed

+26
-2
lines changed

2 files changed

+26
-2
lines changed

06_rows.ipynb

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"metadata": {},
66
"source": [
77
"# Introduction to DataFrames\n",
8-
"**[Bogumił Kamiński](http://bogumilkaminski.pl/about/), Apr 21, 2018**"
8+
"**[Bogumił Kamiński](http://bogumilkaminski.pl/about/), Jun 2, 2018**"
99
]
1010
},
1111
{
@@ -1195,6 +1195,28 @@
11951195
"source": [
11961196
"Tuple(x[1, col] for col in cols) # similar construct for Tuples, when ported to Julia 0.7 NamedTuples will be added"
11971197
]
1198+
},
1199+
{
1200+
"cell_type": "code",
1201+
"execution_count": 40,
1202+
"metadata": {},
1203+
"outputs": [
1204+
{
1205+
"data": {
1206+
"text/plain": [
1207+
"2-element Array{Any,1}:\n",
1208+
" 1 \n",
1209+
" \"a\""
1210+
]
1211+
},
1212+
"execution_count": 40,
1213+
"metadata": {},
1214+
"output_type": "execute_result"
1215+
}
1216+
],
1217+
"source": [
1218+
"vec(Matrix(x[1, cols])) # also you can use a conversion to a Matrix"
1219+
]
11981220
}
11991221
],
12001222
"metadata": {
@@ -1207,7 +1229,7 @@
12071229
"file_extension": ".jl",
12081230
"mimetype": "application/julia",
12091231
"name": "julia",
1210-
"version": "0.6.2"
1232+
"version": "0.6.3"
12111233
}
12121234
},
12131235
"nbformat": 4,

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,3 +77,5 @@ Changelog:
7777

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

0 commit comments

Comments
 (0)