Basic information about a data frame#
using DataFrames
Let’s start by creating a DataFrame
object, x
, so that we can learn how to get information on that data frame.
x = DataFrame(A=[1, 2], B=[1.0, missing], C=["a", "b"])
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 1 | 1.0 | a |
2 | 2 | missing | b |
The standard size
function works to get dimensions of the DataFrame
,
size(x), size(x, 1), size(x, 2)
((2, 3), 2, 3)
as well as nrow
and ncol
from R.
nrow(x), ncol(x)
(2, 3)
describe
gives basic summary statistics of data in your DataFrame
(check out the help of describe
for information on how to customize shown statistics).
describe(x)
Row | variable | mean | min | median | max | nmissing | eltype |
---|---|---|---|---|---|---|---|
Symbol | Union… | Any | Union… | Any | Int64 | Type | |
1 | A | 1.5 | 1 | 1.5 | 2 | 0 | Int64 |
2 | B | 1.0 | 1.0 | 1.0 | 1.0 | 1 | Union{Missing, Float64} |
3 | C | a | b | 0 | String |
you can limit the columns shown by describe
using cols
keyword argument
describe(x, cols=1:2)
Row | variable | mean | min | median | max | nmissing | eltype |
---|---|---|---|---|---|---|---|
Symbol | Float64 | Real | Float64 | Real | Int64 | Type | |
1 | A | 1.5 | 1 | 1.5 | 2 | 0 | Int64 |
2 | B | 1.0 | 1.0 | 1.0 | 1.0 | 1 | Union{Missing, Float64} |
names
will return the names of all columns as strings
names(x)
3-element Vector{String}:
"A"
"B"
"C"
you can also get column names with a given element type (eltype
):
names(x, String)
1-element Vector{String}:
"C"
use propertynames
to get a vector of Symbol
s:
propertynames(x)
3-element Vector{Symbol}:
:A
:B
:C
eltype
on eachcol(x)
returns element types of columns:
eltype.(eachcol(x))
3-element Vector{Type}:
Int64
Union{Missing, Float64}
String
Here we create some large DataFrame
y = DataFrame(rand(1:10, 1000, 10), :auto)
Row | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 |
---|---|---|---|---|---|---|---|---|---|---|
Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | |
1 | 5 | 6 | 8 | 1 | 2 | 5 | 5 | 7 | 10 | 5 |
2 | 8 | 7 | 8 | 10 | 4 | 9 | 9 | 5 | 5 | 7 |
3 | 9 | 3 | 5 | 7 | 9 | 7 | 6 | 8 | 5 | 4 |
4 | 6 | 9 | 7 | 10 | 1 | 3 | 6 | 10 | 6 | 5 |
5 | 3 | 6 | 1 | 1 | 6 | 4 | 8 | 5 | 3 | 10 |
6 | 5 | 9 | 4 | 3 | 9 | 2 | 5 | 2 | 3 | 9 |
7 | 10 | 5 | 1 | 6 | 3 | 1 | 5 | 8 | 7 | 10 |
8 | 1 | 3 | 4 | 9 | 1 | 6 | 10 | 10 | 7 | 6 |
9 | 7 | 2 | 6 | 9 | 6 | 10 | 7 | 9 | 1 | 5 |
10 | 1 | 6 | 1 | 6 | 10 | 8 | 8 | 3 | 4 | 4 |
11 | 2 | 5 | 8 | 9 | 2 | 10 | 7 | 5 | 9 | 10 |
12 | 7 | 2 | 2 | 5 | 7 | 2 | 5 | 7 | 7 | 1 |
13 | 7 | 6 | 2 | 1 | 7 | 7 | 3 | 10 | 10 | 3 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
989 | 8 | 1 | 8 | 5 | 7 | 7 | 3 | 1 | 9 | 4 |
990 | 10 | 5 | 4 | 5 | 9 | 2 | 3 | 9 | 10 | 4 |
991 | 3 | 3 | 6 | 2 | 1 | 3 | 6 | 8 | 3 | 6 |
992 | 1 | 2 | 2 | 8 | 6 | 1 | 3 | 9 | 7 | 10 |
993 | 9 | 6 | 6 | 4 | 6 | 6 | 8 | 9 | 6 | 8 |
994 | 9 | 10 | 10 | 4 | 1 | 8 | 5 | 5 | 3 | 6 |
995 | 6 | 3 | 8 | 10 | 1 | 2 | 10 | 10 | 8 | 1 |
996 | 9 | 10 | 3 | 6 | 2 | 8 | 8 | 7 | 1 | 6 |
997 | 9 | 8 | 6 | 4 | 5 | 1 | 10 | 2 | 10 | 4 |
998 | 10 | 7 | 1 | 1 | 3 | 8 | 8 | 1 | 10 | 7 |
999 | 7 | 7 | 8 | 2 | 1 | 6 | 4 | 2 | 4 | 7 |
1000 | 1 | 6 | 10 | 5 | 1 | 1 | 7 | 3 | 3 | 3 |
and then we can use first
to peek into its first few rows
first(y, 5)
Row | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 |
---|---|---|---|---|---|---|---|---|---|---|
Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | |
1 | 5 | 6 | 8 | 1 | 2 | 5 | 5 | 7 | 10 | 5 |
2 | 8 | 7 | 8 | 10 | 4 | 9 | 9 | 5 | 5 | 7 |
3 | 9 | 3 | 5 | 7 | 9 | 7 | 6 | 8 | 5 | 4 |
4 | 6 | 9 | 7 | 10 | 1 | 3 | 6 | 10 | 6 | 5 |
5 | 3 | 6 | 1 | 1 | 6 | 4 | 8 | 5 | 3 | 10 |
and last
to see its bottom rows.
last(y, 3)
Row | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 |
---|---|---|---|---|---|---|---|---|---|---|
Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | |
1 | 10 | 7 | 1 | 1 | 3 | 8 | 8 | 1 | 10 | 7 |
2 | 7 | 7 | 8 | 2 | 1 | 6 | 4 | 2 | 4 | 7 |
3 | 1 | 6 | 10 | 5 | 1 | 1 | 7 | 3 | 3 | 3 |
Using first
and last
without number of rows will return a first/last DataFrameRow
in the DataFrame
first(y)
Row | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 |
---|---|---|---|---|---|---|---|---|---|---|
Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | |
1 | 5 | 6 | 8 | 1 | 2 | 5 | 5 | 7 | 10 | 5 |
last(y)
Row | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 |
---|---|---|---|---|---|---|---|---|---|---|
Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | Int64 | |
1000 | 1 | 6 | 10 | 5 | 1 | 1 | 7 | 3 | 3 | 3 |
Displaying large data frames#
Create a wide and tall data frame:
df = DataFrame(rand(100, 100), :auto)
Row | x1 | x2 | x3 | x4 | x5 | x6 | x7 | x8 | x9 | x10 | x11 | x12 | x13 | x14 | x15 | x16 | x17 | x18 | x19 | x20 | x21 | x22 | x23 | x24 | x25 | x26 | x27 | x28 | x29 | x30 | x31 | x32 | x33 | x34 | x35 | x36 | x37 | x38 | x39 | x40 | x41 | x42 | x43 | x44 | x45 | x46 | x47 | x48 | x49 | x50 | x51 | x52 | x53 | x54 | x55 | x56 | x57 | x58 | x59 | x60 | x61 | x62 | x63 | x64 | x65 | x66 | x67 | x68 | x69 | x70 | x71 | x72 | x73 | x74 | x75 | x76 | x77 | x78 | x79 | x80 | x81 | x82 | x83 | x84 | x85 | x86 | x87 | x88 | x89 | x90 | x91 | x92 | x93 | x94 | x95 | x96 | x97 | x98 | x99 | x100 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | Float64 | |
1 | 0.844256 | 0.0668823 | 0.567 | 0.551657 | 0.118484 | 0.33853 | 0.310855 | 0.945171 | 0.38507 | 0.896464 | 0.433452 | 0.681074 | 0.904967 | 0.00471435 | 0.682658 | 0.604032 | 0.416615 | 0.776368 | 0.756932 | 0.0558109 | 0.341186 | 0.311118 | 0.592304 | 0.341359 | 0.894394 | 0.140679 | 0.873105 | 0.47731 | 0.941654 | 0.515404 | 0.768689 | 0.579743 | 0.796681 | 0.806707 | 0.131618 | 0.88032 | 0.249526 | 0.816685 | 0.317592 | 0.624753 | 0.190206 | 0.902142 | 0.42182 | 0.472072 | 0.279861 | 0.626106 | 0.965381 | 0.0713934 | 0.071238 | 0.0844341 | 0.368882 | 0.398665 | 0.984455 | 0.990362 | 0.364061 | 0.734649 | 0.71006 | 0.0816289 | 0.151806 | 0.312285 | 0.489228 | 0.248625 | 0.337803 | 0.0284022 | 0.101603 | 0.870132 | 0.0079802 | 0.616875 | 0.373125 | 0.76687 | 0.605687 | 0.507484 | 0.455344 | 0.560565 | 0.615569 | 0.234443 | 0.0345826 | 0.923356 | 0.931315 | 0.658223 | 0.101696 | 0.944935 | 0.899339 | 0.490252 | 0.223467 | 0.350367 | 0.258372 | 0.807389 | 0.251074 | 0.358588 | 0.232726 | 0.654599 | 0.709113 | 0.142154 | 0.357104 | 0.884008 | 0.219839 | 0.610966 | 0.691903 | 0.407382 |
2 | 0.8719 | 0.468618 | 0.957191 | 0.0796404 | 0.724366 | 0.608216 | 0.468599 | 0.996893 | 0.441909 | 0.408979 | 0.965891 | 0.746303 | 0.165313 | 0.88533 | 0.200338 | 0.149525 | 0.00951178 | 0.0130856 | 0.519866 | 0.683369 | 0.282795 | 0.230932 | 0.813891 | 0.884086 | 0.583586 | 0.235099 | 0.434428 | 0.739689 | 0.580061 | 0.481787 | 0.5843 | 0.341157 | 0.81673 | 0.617081 | 0.53174 | 0.654957 | 0.589537 | 0.314471 | 0.339353 | 0.376014 | 0.180112 | 0.0639637 | 0.482624 | 0.839549 | 0.621074 | 0.617005 | 0.990005 | 0.456662 | 0.396391 | 0.787958 | 0.638821 | 0.242873 | 0.0643708 | 0.20136 | 0.788786 | 0.465179 | 0.520764 | 0.169816 | 0.296966 | 0.485767 | 0.0673018 | 0.922243 | 0.96541 | 0.65001 | 0.0660199 | 0.313205 | 0.569132 | 0.132434 | 0.19463 | 0.149481 | 0.679169 | 0.653549 | 0.102255 | 0.636319 | 0.77414 | 0.497032 | 0.810601 | 0.384472 | 0.127871 | 0.459584 | 0.0177815 | 0.840544 | 0.562344 | 0.498424 | 0.067133 | 0.38733 | 0.749678 | 0.486214 | 0.81836 | 0.859234 | 0.233077 | 0.544317 | 0.31277 | 0.182959 | 0.045355 | 0.538729 | 0.586977 | 0.0483114 | 0.442911 | 0.877546 |
3 | 0.577679 | 0.54405 | 0.661818 | 0.898452 | 0.586121 | 0.120988 | 0.0254161 | 0.348759 | 0.701473 | 0.478815 | 0.54739 | 0.802938 | 0.691443 | 0.605206 | 0.823298 | 0.666895 | 0.710662 | 0.35756 | 0.144728 | 0.3279 | 0.406583 | 0.182182 | 0.880548 | 0.750087 | 0.461579 | 0.135032 | 0.197966 | 0.877999 | 0.583412 | 0.325306 | 0.297985 | 0.96721 | 0.887524 | 0.919577 | 0.0259427 | 0.277906 | 0.866209 | 0.731284 | 0.435229 | 0.0979585 | 0.947937 | 0.39069 | 0.511759 | 0.87892 | 0.276792 | 0.349166 | 0.0726504 | 0.129884 | 0.579466 | 0.156758 | 0.657655 | 0.848934 | 0.360811 | 0.045257 | 0.0512056 | 0.89791 | 0.66876 | 0.655865 | 0.841388 | 0.0848227 | 0.698658 | 0.481341 | 0.78682 | 0.540874 | 0.356272 | 0.0909141 | 0.179515 | 0.879715 | 0.548136 | 0.010293 | 0.0245266 | 0.379605 | 0.430149 | 0.196589 | 0.228428 | 0.563346 | 0.774923 | 0.426556 | 0.999986 | 0.0368051 | 0.569602 | 0.531057 | 0.922793 | 0.502568 | 0.401444 | 0.400728 | 0.926669 | 0.962679 | 0.560657 | 0.0532596 | 0.68214 | 0.090803 | 0.972779 | 0.465325 | 0.733617 | 0.670685 | 0.846746 | 0.636178 | 0.910708 | 0.262608 |
4 | 0.116727 | 0.432782 | 0.622528 | 0.295561 | 0.568111 | 0.668279 | 0.461044 | 0.515411 | 0.40398 | 0.646136 | 0.877488 | 0.894652 | 0.148478 | 0.362109 | 0.324142 | 0.421436 | 0.291506 | 0.358636 | 0.327635 | 0.191408 | 0.987814 | 0.263471 | 0.898479 | 0.42629 | 0.597818 | 0.366235 | 0.773158 | 0.927621 | 0.685119 | 0.916676 | 0.405191 | 0.229531 | 0.161131 | 0.917858 | 0.652119 | 0.446682 | 0.984799 | 0.650327 | 0.645653 | 0.683986 | 0.508347 | 0.61294 | 0.0267261 | 0.606989 | 0.504875 | 0.515402 | 0.190455 | 0.585364 | 0.296402 | 0.319473 | 0.0264914 | 0.583244 | 0.109746 | 0.0586045 | 0.808067 | 0.82481 | 0.209433 | 0.0409115 | 0.307789 | 0.131818 | 0.982462 | 0.749449 | 0.670881 | 0.998448 | 0.383991 | 0.59602 | 0.695291 | 0.0766079 | 0.569584 | 0.371074 | 0.382802 | 0.850112 | 0.459444 | 0.72651 | 0.0813982 | 0.182159 | 0.415762 | 0.222944 | 0.511268 | 0.164545 | 0.789141 | 0.49634 | 0.914193 | 0.77512 | 0.500697 | 0.655248 | 0.539598 | 0.970764 | 0.00826668 | 0.119541 | 0.938481 | 0.857301 | 0.14926 | 0.829386 | 0.857735 | 0.145612 | 0.0956917 | 0.308534 | 0.349092 | 0.315909 |
5 | 0.683671 | 0.613049 | 0.220298 | 0.438228 | 0.0242666 | 0.842935 | 0.00699345 | 0.0901759 | 0.393977 | 0.837757 | 0.324878 | 0.993285 | 0.845741 | 0.192377 | 0.899786 | 0.73485 | 0.870901 | 0.910614 | 0.551206 | 0.205634 | 0.680849 | 0.0118382 | 0.367751 | 0.335658 | 0.0126508 | 0.756297 | 0.0964426 | 0.232437 | 0.879698 | 0.200029 | 0.319904 | 0.156192 | 0.231753 | 0.0230183 | 0.340959 | 0.34418 | 0.584721 | 0.00166282 | 0.0597107 | 0.853011 | 0.724491 | 0.77723 | 0.101241 | 0.114914 | 0.727923 | 0.500403 | 0.201361 | 0.479242 | 0.490165 | 0.354988 | 0.396191 | 0.0709412 | 0.88249 | 0.475663 | 0.879843 | 0.0129058 | 0.245522 | 0.302528 | 0.444266 | 0.929024 | 0.0931525 | 0.320936 | 0.254638 | 0.39082 | 0.325567 | 0.0950685 | 0.545384 | 0.632949 | 0.660034 | 0.710268 | 0.211463 | 0.35106 | 0.349551 | 0.726551 | 0.547399 | 0.684658 | 0.609538 | 0.833262 | 0.503273 | 0.148934 | 0.781648 | 0.242276 | 0.496479 | 0.432746 | 0.333536 | 0.232393 | 0.00733559 | 0.351515 | 0.393075 | 0.887083 | 0.666891 | 0.64941 | 0.90167 | 0.622613 | 0.0758721 | 0.615066 | 0.123456 | 0.376246 | 0.777339 | 0.569178 |
6 | 0.427834 | 0.513949 | 0.56678 | 0.999436 | 0.423871 | 0.837248 | 0.910295 | 0.893671 | 0.777988 | 0.713584 | 0.455265 | 0.247484 | 0.176813 | 0.470671 | 0.00485496 | 0.319608 | 0.449528 | 0.216757 | 0.388858 | 0.826797 | 0.656539 | 0.268644 | 0.0204747 | 0.0491477 | 0.980835 | 0.268222 | 0.81993 | 0.869426 | 0.447927 | 0.922771 | 0.566618 | 0.587539 | 0.0184538 | 0.349733 | 0.392465 | 0.000815882 | 0.2439 | 0.232684 | 0.0169687 | 0.382567 | 0.176783 | 0.448383 | 0.0988324 | 0.441 | 0.529586 | 0.594364 | 0.530759 | 0.151566 | 0.959776 | 0.983795 | 0.9999 | 0.730224 | 0.915013 | 0.848547 | 0.333923 | 0.170853 | 0.879759 | 0.321209 | 0.530287 | 0.137337 | 0.0801094 | 0.248864 | 0.440159 | 0.880193 | 0.895381 | 0.131022 | 0.75871 | 0.245307 | 0.795552 | 0.178882 | 0.585938 | 0.758509 | 0.209437 | 0.944004 | 0.558773 | 0.193438 | 0.0664182 | 0.261707 | 0.150508 | 0.55976 | 0.640544 | 0.215634 | 0.914895 | 0.0617384 | 0.740918 | 0.360597 | 0.788736 | 0.601013 | 0.727297 | 0.263043 | 0.422049 | 0.595974 | 0.703911 | 0.0604831 | 0.644251 | 0.87511 | 0.921929 | 0.187756 | 0.347667 | 0.148685 |
7 | 0.909557 | 0.325911 | 0.458564 | 0.318663 | 0.390909 | 0.218676 | 0.604094 | 0.0447851 | 0.640404 | 0.146371 | 0.640499 | 0.0655988 | 0.805589 | 0.831274 | 0.0302491 | 0.945141 | 0.13596 | 0.671562 | 0.866038 | 0.318704 | 0.36081 | 0.863179 | 0.0623619 | 0.97527 | 0.669302 | 0.247893 | 0.29838 | 0.9687 | 0.0320324 | 0.603845 | 0.725242 | 0.141212 | 0.918136 | 0.875059 | 0.039137 | 0.344068 | 0.842704 | 0.4615 | 0.413803 | 0.724892 | 0.722302 | 0.12466 | 0.677676 | 0.980435 | 0.256398 | 0.819051 | 0.574102 | 0.78304 | 0.54163 | 0.49343 | 0.342115 | 0.101933 | 0.642727 | 0.566223 | 0.959089 | 0.0110282 | 0.100682 | 0.245496 | 0.980227 | 0.663761 | 0.848219 | 0.0369858 | 0.309897 | 0.330581 | 0.800141 | 0.294577 | 0.351727 | 0.823352 | 0.656006 | 0.89647 | 0.111445 | 0.68429 | 0.559555 | 0.671526 | 0.527907 | 0.253707 | 0.286268 | 0.377689 | 0.373179 | 0.243478 | 0.902455 | 0.302039 | 0.0807567 | 0.109412 | 0.733264 | 0.149426 | 0.798392 | 0.652509 | 0.803298 | 0.18918 | 0.0988349 | 0.841615 | 0.727597 | 0.227118 | 0.831531 | 0.284112 | 0.564542 | 0.459486 | 0.0974377 | 0.675666 |
8 | 0.424705 | 0.827075 | 0.293787 | 0.471237 | 0.603841 | 0.390415 | 0.491316 | 0.188739 | 0.789393 | 0.773839 | 0.00533227 | 0.138003 | 0.607941 | 0.59205 | 0.227128 | 0.560062 | 0.870875 | 0.928186 | 0.702086 | 0.228891 | 0.689215 | 0.152315 | 0.85111 | 0.3623 | 0.749571 | 0.200667 | 0.455254 | 0.027458 | 0.675557 | 0.0424353 | 0.719021 | 0.918771 | 0.919511 | 0.0533787 | 0.323791 | 0.595676 | 0.525947 | 0.104278 | 0.218973 | 0.817395 | 0.817643 | 0.222574 | 0.738082 | 0.421161 | 0.96539 | 0.029853 | 0.891706 | 0.994136 | 0.194142 | 0.0598373 | 0.733837 | 0.257262 | 0.69743 | 0.798903 | 0.591261 | 0.0954183 | 0.160195 | 0.848746 | 0.0478282 | 0.729093 | 0.685954 | 0.137634 | 0.18294 | 0.321519 | 0.176708 | 0.736877 | 0.0607825 | 0.686066 | 0.372231 | 0.314781 | 0.0524244 | 0.445082 | 0.0595143 | 0.0267979 | 0.343289 | 0.912739 | 0.614065 | 0.912966 | 0.169879 | 0.854143 | 0.963881 | 0.641874 | 0.231983 | 0.975016 | 0.708357 | 0.706058 | 0.833606 | 0.516335 | 0.500775 | 0.738728 | 0.653776 | 0.942542 | 0.0319085 | 0.605754 | 0.328412 | 0.413987 | 0.799422 | 0.181061 | 0.931064 | 0.848057 |
9 | 0.549152 | 0.727659 | 0.981284 | 0.0946632 | 0.755268 | 0.606006 | 0.120896 | 0.671293 | 0.742803 | 0.419951 | 0.322531 | 0.457428 | 0.976783 | 0.0383465 | 0.243198 | 0.21685 | 0.0698221 | 0.591796 | 0.996498 | 0.168007 | 0.472707 | 0.312232 | 0.462852 | 0.536864 | 0.934175 | 0.0378686 | 0.723424 | 0.154036 | 0.479272 | 0.0271998 | 0.764683 | 0.70926 | 0.191257 | 0.16188 | 0.757115 | 0.791628 | 0.0338589 | 0.182394 | 0.461 | 0.902013 | 0.475775 | 0.532996 | 0.988018 | 0.245085 | 0.629059 | 0.364187 | 0.0132398 | 0.831664 | 0.26677 | 0.558911 | 0.865346 | 0.756808 | 0.939271 | 0.355944 | 0.315921 | 0.264344 | 0.667736 | 0.443534 | 0.518881 | 0.203547 | 0.762973 | 0.424711 | 0.899159 | 0.0307284 | 0.58641 | 0.178562 | 0.356314 | 0.906066 | 0.502082 | 0.70061 | 0.861381 | 0.460447 | 0.745617 | 0.00493036 | 0.636903 | 0.13608 | 0.654446 | 0.958381 | 0.643364 | 0.579462 | 0.265692 | 0.244102 | 0.802169 | 0.239009 | 0.701875 | 0.351577 | 0.994684 | 0.0329927 | 0.570144 | 0.2354 | 0.666862 | 0.274254 | 0.672914 | 0.717152 | 0.371034 | 0.173543 | 0.547832 | 0.338992 | 0.365534 | 0.59494 |
10 | 0.707428 | 0.996908 | 0.112766 | 0.710725 | 0.648795 | 0.637375 | 0.298356 | 0.219696 | 0.0466371 | 0.84639 | 0.091638 | 0.194547 | 0.731971 | 0.765614 | 0.434237 | 0.622145 | 0.462938 | 0.689897 | 0.874973 | 0.160952 | 0.542762 | 0.922389 | 0.964884 | 0.0690983 | 0.837654 | 0.404874 | 0.558488 | 0.310901 | 0.267593 | 0.496657 | 0.763922 | 0.883589 | 0.951421 | 0.521344 | 0.0455261 | 0.576169 | 0.47881 | 0.63872 | 0.542586 | 0.168223 | 0.754787 | 0.996933 | 0.45787 | 0.931103 | 0.193243 | 0.781495 | 0.16483 | 0.488756 | 0.815096 | 0.0332504 | 0.284898 | 0.952099 | 0.291742 | 0.26905 | 0.390661 | 0.542663 | 0.893974 | 0.0321304 | 0.669658 | 0.326828 | 0.634295 | 0.384255 | 0.755167 | 0.304469 | 0.174578 | 0.261532 | 0.961702 | 0.676378 | 0.175343 | 0.846817 | 0.269981 | 0.790754 | 0.589623 | 0.955392 | 0.175706 | 0.449102 | 0.360476 | 0.772637 | 0.351239 | 0.820992 | 0.0848891 | 0.827953 | 0.24567 | 0.902081 | 0.788083 | 0.0202228 | 0.340472 | 0.823825 | 0.859638 | 0.744758 | 0.1496 | 0.886949 | 0.65503 | 0.750087 | 0.63595 | 0.553931 | 0.063211 | 0.315807 | 0.577465 | 0.689816 |
11 | 0.699751 | 0.52198 | 0.447571 | 0.148441 | 0.926807 | 0.420547 | 0.0501567 | 0.138079 | 0.111372 | 0.300232 | 0.833343 | 0.0115285 | 0.677582 | 0.379722 | 0.355536 | 0.081632 | 0.908938 | 0.759332 | 0.803408 | 0.425894 | 0.574083 | 0.706847 | 0.498689 | 0.0281439 | 0.75552 | 0.738299 | 0.0109323 | 0.624571 | 0.78645 | 0.657879 | 0.118 | 0.560252 | 0.411475 | 0.97006 | 0.44986 | 0.221953 | 0.546956 | 0.742479 | 0.854655 | 0.262805 | 0.0955964 | 0.525464 | 0.0570973 | 0.16953 | 0.398655 | 0.0251046 | 0.879449 | 0.0910519 | 0.682382 | 0.977196 | 0.885342 | 0.607885 | 0.0380903 | 0.316489 | 0.444004 | 0.0863378 | 0.167392 | 0.544694 | 0.206678 | 0.229291 | 0.849923 | 0.937621 | 0.64172 | 0.940934 | 0.410584 | 0.600262 | 0.0147263 | 0.330138 | 0.712065 | 0.309374 | 0.579645 | 0.410598 | 0.240285 | 0.923685 | 0.509068 | 0.184882 | 0.0610715 | 0.90165 | 0.563112 | 0.316674 | 0.406472 | 0.177218 | 0.844284 | 0.614515 | 0.539652 | 0.199976 | 0.996071 | 0.297534 | 0.846677 | 0.881007 | 0.311913 | 0.667961 | 0.638964 | 0.575924 | 0.253287 | 0.860942 | 0.469446 | 0.752679 | 0.734656 | 0.3209 |
12 | 0.884787 | 0.271627 | 0.57534 | 0.00841484 | 0.2732 | 0.621088 | 0.888546 | 0.629969 | 0.55022 | 0.27574 | 0.563476 | 0.870339 | 0.786786 | 0.0212632 | 0.682377 | 0.00240055 | 0.158048 | 0.456682 | 0.431255 | 0.568387 | 0.411701 | 0.644508 | 0.78462 | 0.229729 | 0.0515107 | 0.901133 | 0.54151 | 0.877904 | 0.151196 | 0.371579 | 0.770198 | 0.604873 | 0.747923 | 0.550973 | 0.870192 | 0.542442 | 0.623545 | 0.459329 | 0.212316 | 0.517455 | 0.840877 | 0.498299 | 0.0785341 | 0.569858 | 0.611856 | 0.809776 | 0.68302 | 0.882125 | 0.288432 | 0.399714 | 0.760813 | 0.231934 | 0.109383 | 0.757688 | 0.276537 | 0.104265 | 0.995363 | 0.665523 | 0.187614 | 0.72008 | 0.474894 | 0.396762 | 0.34196 | 0.475021 | 0.944212 | 0.120504 | 0.382222 | 0.137441 | 0.139879 | 0.128272 | 0.83092 | 0.221283 | 0.420698 | 0.658829 | 0.479314 | 0.680371 | 0.258695 | 0.0103429 | 0.812889 | 0.202175 | 0.617671 | 0.738791 | 0.76798 | 0.559045 | 0.0175211 | 0.375987 | 0.664869 | 0.0496466 | 0.365874 | 0.156773 | 0.110289 | 0.257866 | 0.464807 | 0.349948 | 0.97884 | 0.761072 | 0.934837 | 0.0772391 | 0.147597 | 0.804986 |
13 | 0.678788 | 0.884782 | 0.266971 | 0.586282 | 0.809338 | 0.660275 | 0.569687 | 0.691772 | 0.197458 | 0.673289 | 0.749233 | 0.942353 | 0.774246 | 0.936663 | 0.742744 | 0.182629 | 0.639742 | 0.367841 | 0.874462 | 0.607215 | 0.931494 | 0.798289 | 0.610465 | 0.47321 | 0.0443467 | 0.679424 | 0.0547779 | 0.183149 | 0.162877 | 0.751192 | 0.754936 | 0.362777 | 0.74909 | 0.564414 | 0.358143 | 0.205837 | 0.470362 | 0.398122 | 0.505512 | 0.759628 | 0.778212 | 0.199435 | 0.140016 | 0.782937 | 0.2636 | 0.412173 | 0.389494 | 0.887161 | 0.854073 | 0.0944335 | 0.298731 | 0.39661 | 0.35361 | 0.431193 | 0.252291 | 0.492332 | 0.0149822 | 0.757333 | 0.271997 | 0.945065 | 0.755596 | 0.0717597 | 0.132874 | 0.35689 | 0.892229 | 0.691565 | 0.144009 | 0.166469 | 0.41289 | 0.627371 | 0.64872 | 0.877877 | 0.988459 | 0.775646 | 0.00504094 | 0.0549013 | 0.997169 | 0.239244 | 0.560775 | 0.951918 | 0.01384 | 0.742469 | 0.253678 | 0.162761 | 0.643264 | 0.966595 | 0.159158 | 0.63806 | 0.42277 | 0.953154 | 0.358996 | 0.159541 | 0.207436 | 0.196681 | 0.890051 | 0.0175969 | 0.964637 | 0.326327 | 0.711032 | 0.0082302 |
⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ | ⋮ |
89 | 0.212804 | 0.293885 | 0.212718 | 0.253022 | 0.635624 | 0.144887 | 0.422322 | 0.373822 | 0.570056 | 0.419162 | 0.700571 | 0.393572 | 0.615892 | 0.142851 | 0.997269 | 0.305327 | 0.177778 | 0.165351 | 0.909981 | 0.988352 | 0.882459 | 0.773398 | 0.244266 | 0.76394 | 0.296729 | 0.0182127 | 0.593118 | 0.725067 | 0.53227 | 0.934541 | 0.95777 | 0.868866 | 0.447668 | 0.307592 | 0.00848996 | 0.737578 | 0.377781 | 0.220627 | 0.85501 | 0.843521 | 0.487739 | 0.963938 | 0.22472 | 0.589578 | 0.182821 | 0.934939 | 0.349369 | 0.701055 | 0.0462577 | 0.662115 | 0.0134804 | 0.286255 | 0.147001 | 0.912276 | 0.716269 | 0.240775 | 0.636291 | 0.332411 | 0.0786517 | 0.0800259 | 0.0266711 | 0.155038 | 0.378708 | 0.43295 | 0.526608 | 0.252696 | 0.319068 | 0.25787 | 0.208778 | 0.61703 | 0.165349 | 0.850123 | 0.932568 | 0.793352 | 0.859251 | 0.757959 | 0.123609 | 0.805796 | 0.312678 | 0.625676 | 0.617576 | 0.0986151 | 0.517865 | 0.19022 | 0.16384 | 0.662472 | 0.90469 | 0.536187 | 0.845504 | 0.536512 | 0.118312 | 0.549136 | 0.248538 | 0.412962 | 0.716118 | 0.426739 | 0.945821 | 0.0495502 | 0.96029 | 0.738079 |
90 | 0.0913794 | 0.654536 | 0.0940619 | 0.563186 | 0.211482 | 0.607019 | 0.851036 | 0.755378 | 0.193065 | 0.014065 | 0.776083 | 0.229983 | 0.159331 | 0.940463 | 0.396519 | 0.907033 | 0.989192 | 0.132143 | 0.271648 | 0.0976583 | 0.481293 | 0.246812 | 0.96856 | 0.131655 | 0.363364 | 0.668854 | 0.870605 | 0.42135 | 0.0737153 | 0.687425 | 0.43995 | 0.0161129 | 0.116482 | 0.205712 | 0.741062 | 0.085803 | 0.686693 | 0.594967 | 0.129049 | 0.954639 | 0.605172 | 0.769287 | 0.023613 | 0.68918 | 0.0589967 | 0.214887 | 0.72243 | 0.944457 | 0.264433 | 0.975697 | 0.163174 | 0.297991 | 0.792324 | 0.415892 | 0.322154 | 0.735329 | 0.54327 | 0.696151 | 0.798266 | 0.826176 | 0.27152 | 0.965644 | 0.229173 | 0.771735 | 0.729096 | 0.65793 | 0.512893 | 0.382012 | 0.737952 | 0.198981 | 0.552884 | 0.934068 | 0.348598 | 0.801569 | 0.796482 | 0.183527 | 0.0585727 | 0.0862174 | 0.824017 | 0.66738 | 0.561822 | 0.621815 | 0.0657501 | 0.981321 | 0.454346 | 0.651265 | 0.774028 | 0.35052 | 0.394744 | 0.73499 | 0.678765 | 0.0651805 | 0.0954262 | 0.899344 | 0.343489 | 0.427586 | 0.958792 | 0.780119 | 0.0953289 | 0.967183 |
91 | 0.636117 | 0.894776 | 0.402184 | 0.717116 | 0.835904 | 0.917579 | 0.196051 | 0.69053 | 0.285305 | 0.542277 | 0.901048 | 0.42946 | 0.0840853 | 0.200465 | 0.521154 | 0.881345 | 0.918563 | 0.225036 | 0.00886087 | 0.1606 | 0.748128 | 0.639704 | 0.486232 | 0.145414 | 0.151705 | 0.24795 | 0.619211 | 0.184144 | 0.659661 | 0.356318 | 0.407647 | 0.645406 | 0.350943 | 0.981304 | 0.595887 | 0.0412124 | 0.598601 | 0.161793 | 0.0181855 | 0.793593 | 0.464351 | 0.788551 | 0.0939564 | 0.606011 | 0.872285 | 0.802529 | 0.0554974 | 0.190743 | 0.854471 | 0.800187 | 0.9798 | 0.444882 | 0.259207 | 0.119431 | 0.31573 | 0.411014 | 0.633095 | 0.745616 | 0.0804128 | 0.306069 | 0.879985 | 0.63439 | 0.342583 | 0.629744 | 0.440868 | 0.149775 | 0.778829 | 0.832682 | 0.40166 | 0.526038 | 0.712453 | 0.759113 | 0.853233 | 0.0759176 | 0.919118 | 0.404626 | 0.547654 | 0.0246437 | 0.0957754 | 0.926201 | 0.840967 | 0.781405 | 0.0462364 | 0.27176 | 0.445632 | 0.842159 | 0.960982 | 0.0430069 | 0.336773 | 0.62891 | 0.626377 | 0.686636 | 0.276709 | 0.484482 | 0.993545 | 0.0372809 | 0.285618 | 0.720383 | 0.177709 | 0.798112 |
92 | 0.0573265 | 0.682249 | 0.498101 | 0.16999 | 0.473845 | 0.118552 | 0.804781 | 0.491764 | 0.450861 | 0.904377 | 0.498975 | 0.127502 | 0.0762188 | 0.253229 | 0.445587 | 0.507242 | 0.049871 | 0.897789 | 0.519275 | 0.00262151 | 0.934347 | 0.760436 | 0.999612 | 0.87007 | 0.2831 | 0.485873 | 0.899324 | 0.571482 | 0.724788 | 0.679637 | 0.264938 | 0.860351 | 0.481939 | 0.539614 | 0.360285 | 0.141592 | 0.828088 | 0.515181 | 0.505536 | 0.255536 | 0.527111 | 0.277038 | 0.642164 | 0.341586 | 0.723611 | 0.11753 | 0.462971 | 0.702316 | 0.557323 | 0.346459 | 0.146361 | 0.054416 | 0.703855 | 0.120383 | 0.651083 | 0.352701 | 0.433299 | 0.284631 | 0.964296 | 0.536854 | 0.0998656 | 0.722714 | 0.124838 | 0.587084 | 0.237382 | 0.737999 | 0.909064 | 0.886713 | 0.128867 | 0.514056 | 0.233878 | 0.288318 | 0.324039 | 0.166451 | 0.472048 | 0.989076 | 0.539681 | 0.367408 | 0.692103 | 0.348181 | 0.0443503 | 0.588226 | 0.164241 | 0.306345 | 0.0468659 | 0.662398 | 0.698564 | 0.400183 | 0.271195 | 0.611516 | 0.208144 | 0.0400924 | 0.90307 | 0.400541 | 0.737763 | 0.195548 | 0.0545986 | 0.207726 | 0.357085 | 0.104791 |
93 | 0.561582 | 0.33546 | 0.883218 | 0.607658 | 0.0063094 | 0.6283 | 0.399518 | 0.785664 | 0.572679 | 0.896089 | 0.571764 | 0.771129 | 0.864971 | 0.135688 | 0.662328 | 0.133569 | 0.687729 | 0.326101 | 0.272925 | 0.528201 | 0.0525759 | 0.817494 | 0.178797 | 0.739806 | 0.454253 | 0.714375 | 0.566169 | 0.0328196 | 0.758738 | 0.267049 | 0.84543 | 0.377195 | 0.696632 | 0.128546 | 0.920894 | 0.132186 | 0.202111 | 0.0592446 | 0.212255 | 0.761403 | 0.940673 | 0.919046 | 0.827319 | 0.0601751 | 0.0835455 | 0.613236 | 0.348011 | 0.318504 | 0.714914 | 0.0243629 | 0.364726 | 0.131309 | 0.725063 | 0.553806 | 0.202301 | 0.906384 | 0.046747 | 0.248971 | 0.345944 | 0.180543 | 0.0604942 | 0.697779 | 0.416731 | 0.739488 | 0.211371 | 0.086143 | 0.773961 | 0.84444 | 0.293817 | 0.563413 | 0.449698 | 0.526947 | 0.781177 | 0.927669 | 0.415896 | 0.807536 | 0.201393 | 0.0162787 | 0.121616 | 0.0692643 | 0.562667 | 0.472171 | 0.15688 | 0.146136 | 0.918729 | 0.95508 | 0.887644 | 0.0348786 | 0.0521844 | 0.0670401 | 0.272272 | 0.799941 | 0.734983 | 0.806232 | 0.709317 | 0.0193936 | 0.87794 | 0.810816 | 0.115122 | 0.272992 |
94 | 0.462119 | 0.187593 | 0.520843 | 0.958833 | 0.597822 | 0.220315 | 0.233738 | 0.647995 | 0.365718 | 0.90601 | 0.25287 | 0.436401 | 0.505423 | 0.583239 | 0.726938 | 0.868867 | 0.477839 | 0.481065 | 0.807572 | 0.342479 | 0.103447 | 0.983276 | 0.48431 | 0.63625 | 0.119548 | 0.113098 | 0.701097 | 0.519782 | 0.129662 | 0.984459 | 0.184126 | 0.837289 | 0.296719 | 0.0515128 | 0.670503 | 0.0633974 | 0.991003 | 0.892242 | 0.554554 | 0.342256 | 0.897306 | 0.884588 | 0.0129027 | 0.10676 | 0.250634 | 0.00316471 | 0.732155 | 0.705969 | 0.848067 | 0.825062 | 0.303924 | 0.677794 | 0.584275 | 0.417137 | 0.365528 | 0.572629 | 0.741451 | 0.225493 | 0.485956 | 0.38058 | 0.0358346 | 0.129532 | 0.245411 | 0.596629 | 0.447211 | 0.123775 | 0.321972 | 0.849272 | 0.296632 | 0.335953 | 0.483654 | 0.460094 | 0.757226 | 0.751384 | 0.495115 | 0.299448 | 0.90924 | 0.577303 | 0.885192 | 0.524693 | 0.278594 | 0.424011 | 0.224788 | 0.0911812 | 0.285797 | 0.146363 | 0.00674087 | 0.233129 | 0.407312 | 0.672358 | 0.596771 | 0.0198817 | 0.677215 | 0.821198 | 0.29421 | 0.951927 | 0.937524 | 0.810509 | 0.335733 | 0.805719 |
95 | 0.792523 | 0.795841 | 0.0809542 | 0.771054 | 0.812273 | 0.311722 | 0.851508 | 0.242442 | 0.215318 | 0.872277 | 0.760758 | 0.0476395 | 0.10172 | 0.787628 | 0.386545 | 0.230345 | 0.196593 | 0.149424 | 0.585782 | 0.938252 | 0.305026 | 0.702149 | 0.157292 | 0.309427 | 0.159319 | 0.285744 | 0.867321 | 0.78007 | 0.561144 | 0.911951 | 0.816195 | 0.698471 | 0.34457 | 0.253968 | 0.200775 | 0.447019 | 0.390649 | 0.403672 | 0.34621 | 0.333767 | 0.718406 | 0.627622 | 0.734341 | 0.59027 | 0.640294 | 0.978188 | 0.693738 | 0.366321 | 0.651478 | 0.202772 | 0.906315 | 0.669901 | 0.595884 | 0.685987 | 0.402664 | 0.939414 | 0.081011 | 0.582561 | 0.311318 | 0.214304 | 0.955547 | 0.583807 | 0.354388 | 0.418396 | 0.604174 | 0.955917 | 0.545255 | 0.205357 | 0.412927 | 0.00933296 | 0.325293 | 0.908114 | 0.253089 | 0.294679 | 0.307218 | 0.0354921 | 0.547474 | 0.458772 | 0.830449 | 0.331864 | 0.861796 | 0.395069 | 0.521496 | 0.480037 | 0.322274 | 0.857003 | 0.612995 | 0.0872349 | 0.608151 | 0.903944 | 0.587743 | 0.393946 | 0.185968 | 0.613442 | 0.590178 | 0.06738 | 0.859409 | 0.92204 | 0.58329 | 0.918472 |
96 | 0.798249 | 0.0139352 | 0.389979 | 0.863496 | 0.728345 | 0.967889 | 0.649175 | 0.798539 | 0.251866 | 0.923203 | 0.937303 | 0.308281 | 0.993112 | 0.155233 | 0.260057 | 0.951474 | 0.720915 | 0.535539 | 0.26128 | 0.74998 | 0.859851 | 0.174897 | 0.932023 | 0.927977 | 0.523759 | 0.786783 | 0.534749 | 0.0853061 | 0.261321 | 0.230377 | 0.514621 | 0.643937 | 0.0735121 | 0.930131 | 0.208274 | 0.0821513 | 0.562242 | 0.380401 | 0.556969 | 0.966129 | 0.162521 | 0.166216 | 0.978808 | 0.537341 | 0.593896 | 0.623587 | 0.355943 | 0.0432651 | 0.420625 | 0.40916 | 0.573975 | 0.217328 | 0.0920398 | 0.00965273 | 0.939556 | 0.988386 | 0.478661 | 0.67574 | 0.655161 | 0.0395486 | 0.499508 | 0.443721 | 0.173495 | 0.201896 | 0.145139 | 0.440245 | 0.528813 | 0.975398 | 0.681623 | 0.049547 | 0.704453 | 0.221873 | 0.942717 | 0.884382 | 0.907129 | 0.00955213 | 0.778493 | 0.48199 | 0.440267 | 0.261721 | 0.0173628 | 0.626173 | 0.040279 | 0.660151 | 0.55384 | 0.852073 | 0.0457296 | 0.802462 | 0.934102 | 0.7383 | 0.309025 | 0.46234 | 0.0117111 | 0.755679 | 0.917274 | 0.50576 | 0.229283 | 0.331137 | 0.125454 | 0.760506 |
97 | 0.519667 | 0.955074 | 0.453871 | 0.0861905 | 0.272253 | 0.956206 | 0.0594265 | 0.893616 | 0.917492 | 0.496702 | 0.563375 | 0.917444 | 0.366419 | 0.670758 | 0.963113 | 0.283539 | 0.0118828 | 0.738011 | 0.378838 | 0.573788 | 0.0268045 | 0.0466185 | 0.956227 | 0.292544 | 0.535731 | 0.114817 | 0.147785 | 0.658215 | 0.903743 | 0.795769 | 0.700903 | 0.00996635 | 0.694572 | 0.611361 | 0.864048 | 0.613298 | 0.871563 | 0.248888 | 0.336457 | 0.376855 | 0.677733 | 0.45485 | 0.976742 | 0.737864 | 0.947394 | 0.944891 | 0.718898 | 0.297817 | 0.465472 | 0.383739 | 0.866361 | 0.410308 | 0.602245 | 0.065845 | 0.5296 | 0.17536 | 0.844635 | 0.840868 | 0.952686 | 0.417646 | 0.440874 | 0.491852 | 0.483613 | 0.162464 | 0.113258 | 0.400773 | 0.767414 | 0.83094 | 0.796152 | 0.0816913 | 0.201456 | 0.112149 | 0.0145283 | 0.181328 | 0.667866 | 0.379725 | 0.0909713 | 0.0181396 | 0.0668145 | 0.100754 | 0.0495676 | 0.392298 | 0.216189 | 0.000394595 | 0.684554 | 0.654823 | 0.382431 | 0.851606 | 0.0327313 | 0.307185 | 0.084858 | 0.383347 | 0.446531 | 0.190751 | 0.0631461 | 0.940505 | 0.892295 | 0.167919 | 0.319883 | 0.20966 |
98 | 0.23521 | 0.3599 | 0.870882 | 0.661748 | 0.557167 | 0.931869 | 0.975586 | 0.590899 | 0.470568 | 0.989319 | 0.850104 | 0.90056 | 0.059127 | 0.55002 | 0.258463 | 0.149208 | 0.730002 | 0.234307 | 0.497323 | 0.0709307 | 0.539941 | 0.240137 | 0.955193 | 0.862232 | 0.994953 | 0.123036 | 0.384365 | 0.928323 | 0.451794 | 0.642276 | 0.0361131 | 0.663722 | 0.380392 | 0.795786 | 0.83657 | 0.504823 | 0.521073 | 0.592802 | 0.7768 | 0.117694 | 0.149765 | 0.51387 | 0.0263465 | 0.249297 | 0.223304 | 0.566113 | 0.979137 | 0.754402 | 0.354965 | 0.204201 | 0.0417657 | 0.615977 | 0.906112 | 0.961377 | 0.850036 | 0.556908 | 0.536251 | 0.921475 | 0.457121 | 0.187381 | 0.150742 | 0.0987438 | 0.430889 | 0.935266 | 0.72796 | 0.391086 | 0.81011 | 0.74819 | 0.695063 | 0.510443 | 0.480645 | 0.82907 | 0.330264 | 0.797485 | 0.475858 | 0.907944 | 0.519444 | 0.92542 | 0.695256 | 0.650836 | 0.654154 | 0.547933 | 0.603885 | 0.282572 | 0.630468 | 0.124405 | 0.914305 | 0.997659 | 0.473303 | 0.921206 | 0.393148 | 0.287271 | 0.524155 | 0.707818 | 0.69408 | 0.778275 | 0.998993 | 0.98971 | 0.475648 | 0.0929009 |
99 | 0.401977 | 0.443178 | 0.754412 | 0.35953 | 0.922169 | 0.547834 | 0.866473 | 0.470658 | 0.364547 | 0.716714 | 0.0816037 | 0.729351 | 0.063461 | 0.59508 | 0.099768 | 0.410582 | 0.204032 | 0.939696 | 0.671348 | 0.249024 | 0.465008 | 0.657213 | 0.905122 | 0.0729225 | 0.000197207 | 0.834807 | 0.599135 | 0.986933 | 0.593112 | 0.598871 | 0.505731 | 0.342063 | 0.271461 | 0.692258 | 0.896511 | 0.767084 | 0.0558111 | 0.590768 | 0.397237 | 0.638873 | 0.263853 | 0.0796153 | 0.951561 | 0.165339 | 0.987486 | 0.139284 | 0.190149 | 0.490753 | 0.163152 | 0.234067 | 0.192261 | 0.985753 | 0.535492 | 0.0895565 | 0.53303 | 0.529309 | 0.0720213 | 0.236476 | 0.462361 | 0.661095 | 0.415457 | 0.435456 | 0.401756 | 0.7957 | 0.672251 | 0.951887 | 0.688041 | 0.199389 | 0.584053 | 0.0331525 | 0.309469 | 0.193835 | 0.619445 | 0.381741 | 0.503881 | 0.785217 | 0.20534 | 0.404294 | 0.697925 | 0.0081841 | 0.554862 | 0.202243 | 0.569677 | 0.213537 | 0.328969 | 0.00819411 | 0.439174 | 0.760609 | 0.302684 | 0.466082 | 0.140983 | 0.328594 | 0.874453 | 0.185052 | 0.881058 | 0.624322 | 0.090149 | 0.47203 | 0.196817 | 0.225026 |
100 | 0.917935 | 0.559827 | 0.00564548 | 0.82064 | 0.450361 | 0.930704 | 0.672358 | 0.12221 | 0.18651 | 0.722401 | 0.0923482 | 0.563877 | 0.708533 | 0.917438 | 0.0635662 | 0.0317044 | 0.88377 | 0.473567 | 0.537176 | 0.857965 | 0.319992 | 0.321317 | 0.119638 | 0.469741 | 0.631515 | 0.396478 | 0.846073 | 0.303857 | 0.724714 | 0.587705 | 0.719795 | 0.987426 | 0.460435 | 0.885693 | 0.548741 | 0.028342 | 0.288958 | 0.814525 | 0.791307 | 0.175551 | 0.915608 | 0.327394 | 0.236356 | 0.312952 | 0.587237 | 0.024511 | 0.832208 | 0.802515 | 0.0987889 | 0.953095 | 0.499984 | 0.860154 | 0.835102 | 0.573315 | 0.34874 | 0.795629 | 0.0761107 | 0.0815266 | 0.596843 | 0.573991 | 0.00879872 | 0.669382 | 0.162957 | 0.0920905 | 0.662207 | 0.263905 | 0.19834 | 0.730247 | 0.111504 | 0.914243 | 0.996416 | 0.701996 | 0.678341 | 0.30844 | 0.99879 | 0.552344 | 0.113291 | 0.159997 | 0.876846 | 0.809061 | 0.0316055 | 0.886758 | 0.113211 | 0.350688 | 0.234398 | 0.0487931 | 0.637383 | 0.673184 | 0.33101 | 0.4389 | 0.396528 | 0.581121 | 0.116307 | 0.619656 | 0.737444 | 0.275203 | 0.579136 | 0.132973 | 0.0157986 | 0.581863 |
we can see that 92 of its columns were not printed. Also we get its first 30 rows. You can easily change this behavior by changing the value of ENV["LINES"]
and ENV["COLUMNS"]
.
withenv("LINES" => 10, "COLUMNS" => 200) do
show(df)
end
100×100 DataFrame
Row │ x1 x2 x3 x4 x5 x6 x7 x8 x9 x10 x11 x12 x13 x14 x15 x16 x17 x18 ⋯
│ Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 Float64 ⋯
─────┼──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
1 │ 0.844256 0.0668823 0.567 0.551657 0.118484 0.33853 0.310855 0.945171 0.38507 0.896464 0.433452 0.681074 0.904967 0.00471435 0.682658 0.604032 0.416615 0.776368 ⋯
⋮ │ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋮ ⋱
82 columns and 99 rows omitted
Most elementary get and set operations#
Given the DataFrame
x
we have created earlier, here are various ways to grab one of its columns as a Vector
.
x = DataFrame(A=[1, 2], B=[1.0, missing], C=["a", "b"])
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 1 | 1.0 | a |
2 | 2 | missing | b |
all get the vector stored in our DataFrame without copying it
x.A, x[!, 1], x[!, :A]
([1, 2], [1, 2], [1, 2])
the same using string indexing
x."A", x[!, "A"]
([1, 2], [1, 2])
note that this creates a copy
x[:, 1]
2-element Vector{Int64}:
1
2
x[:, 1] === x[:, 1]
false
To grab one row as a DataFrame
, we can index as follows.
x[1:1, :]
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 1 | 1.0 | a |
this produces a DataFrameRow which is treated as 1-dimensional object similar to a NamedTuple
x[1, :]
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 1 | 1.0 | a |
We can grab a single cell or element with the same syntax to grab an element of an array.
x[1, 1]
1
or a new DataFrame
that is a subset of rows and columns
x[1:2, 1:2]
Row | A | B |
---|---|---|
Int64 | Float64? | |
1 | 1 | 1.0 |
2 | 2 | missing |
You can also use Regex
to select columns and Not
from InvertedIndices.jl both to select rows and columns
x[Not(1), r"A"]
Row | A |
---|---|
Int64 | |
1 | 2 |
!
indicates that underlying columns are not copied
x[!, Not(1)]
Row | B | C |
---|---|---|
Float64? | String | |
1 | 1.0 | a |
2 | missing | b |
:
means that the columns will get copied
x[:, Not(1)]
Row | B | C |
---|---|---|
Float64? | String | |
1 | 1.0 | a |
2 | missing | b |
Assignment of a scalar to a data frame can be done in ranges using broadcasting:
x[1:2, 1:2] .= 1
x
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 1 | 1.0 | a |
2 | 1 | 1.0 | b |
Assignment of a vector of length equal to the number of assigned rows using broadcasting
x[1:2, 1:2] .= [1, 2]
x
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 1 | 1.0 | a |
2 | 2 | 2.0 | b |
Assignment or of another data frame of matching size and column names, again using broadcasting:
x[1:2, 1:2] .= DataFrame([5 6; 7 8], [:A, :B])
x
Row | A | B | C |
---|---|---|---|
Int64 | Float64? | String | |
1 | 5 | 6.0 | a |
2 | 7 | 8.0 | b |
Caution
With df[!, :col]
and df.col
syntax you get a direct (non copying) access to a column of a data frame.
This is potentially unsafe as you can easily corrupt data in the df
data frame if you resize, sort, etc. the column obtained in this way.
Therefore such access should be used with caution.
Similarly df[!, cols]
when cols
is a collection of columns produces a new data frame that holds the same (not copied) columns as the source df
data frame. Similarly, modifying the data frame obtained via df[!, cols]
might cause problems with the consistency of df
.
The df[:, :col]
and df[:, cols]
syntaxes always copy columns so they are safe to use (and should generally be preferred except for performance or memory critical use cases).
Here are examples of how Cols
and Between
can be used to select columns of a data frame.
x = DataFrame(rand(4, 5), :auto)
Row | x1 | x2 | x3 | x4 | x5 |
---|---|---|---|---|---|
Float64 | Float64 | Float64 | Float64 | Float64 | |
1 | 0.50353 | 0.639538 | 0.412729 | 0.270223 | 0.11665 |
2 | 0.783014 | 0.528262 | 0.58254 | 0.265462 | 0.0297447 |
3 | 0.283271 | 0.657176 | 0.90543 | 0.770692 | 0.168181 |
4 | 0.534801 | 0.759418 | 0.72703 | 0.688728 | 0.021263 |
x[:, Between(:x2, :x4)]
Row | x2 | x3 | x4 |
---|---|---|---|
Float64 | Float64 | Float64 | |
1 | 0.639538 | 0.412729 | 0.270223 |
2 | 0.528262 | 0.58254 | 0.265462 |
3 | 0.657176 | 0.90543 | 0.770692 |
4 | 0.759418 | 0.72703 | 0.688728 |
x[:, Cols("x1", Between("x2", "x4"))]
Row | x1 | x2 | x3 | x4 |
---|---|---|---|---|
Float64 | Float64 | Float64 | Float64 | |
1 | 0.50353 | 0.639538 | 0.412729 | 0.270223 |
2 | 0.783014 | 0.528262 | 0.58254 | 0.265462 |
3 | 0.283271 | 0.657176 | 0.90543 | 0.770692 |
4 | 0.534801 | 0.759418 | 0.72703 | 0.688728 |
Views#
You can simply create a view of a DataFrame
(it is more efficient than creating a materialized selection). Here are the possible return value options.
@view x[1:2, 1]
2-element view(::Vector{Float64}, 1:2) with eltype Float64:
0.5035299629434845
0.7830142455686
@view x[1, 1]
0-dimensional view(::Vector{Float64}, 1) with eltype Float64:
0.5035299629434845
a DataFrameRow, the same as for x[1, 1:2] without a view
@view x[1, 1:2]
Row | x1 | x2 |
---|---|---|
Float64 | Float64 | |
1 | 0.50353 | 0.639538 |
a SubDataFrame
@view x[1:2, 1:2]
Row | x1 | x2 |
---|---|---|
Float64 | Float64 | |
1 | 0.50353 | 0.639538 |
2 | 0.783014 | 0.528262 |
Adding new columns to a data frame#
df = DataFrame()
using setproperty!
(element assignment)
x = [1, 2, 3]
df.a = x
df
Row | a |
---|---|
Int64 | |
1 | 1 |
2 | 2 |
3 | 3 |
no copy is performed (sharing the same memory address)
df.a === x
true
using setindex!
df[!, :b] = x
df[:, :c] = x
df
Row | a | b | c |
---|---|---|---|
Int64 | Int64 | Int64 | |
1 | 1 | 1 | 1 |
2 | 2 | 2 | 2 |
3 | 3 | 3 | 3 |
no copy is performed
df.b === x
true
With copying
!
and :
has different effects
df.c === x
false
Element-wise assignment
df[!, :d] .= x
df[:, :e] .= x
df
Row | a | b | c | d | e |
---|---|---|---|---|---|
Int64 | Int64 | Int64 | Int64 | Int64 | |
1 | 1 | 1 | 1 | 1 | 1 |
2 | 2 | 2 | 2 | 2 | 2 |
3 | 3 | 3 | 3 | 3 | 3 |
both copy, so in this case !
and :
has the same effect
df.d === x, df.e === x
(false, false)
note that in our data frame columns :a
and :b
store the vector x
(not a copy)
df.a === df.b === x
true
This can lead to silent errors. For example this code leads to a bug (note that calling pairs
on eachcol(df)
creates an iterator of (column name, column) pairs):
try
for (n, c) in pairs(eachcol(df))
println("$n: ", pop!(c))
end
catch e
show(e)
end
a: 3
b: 2
c: 3
d: 3
e: 3
note that for column :b
we printed 2
as 3
was removed from it when we used pop!
on column :a
.
Such mistakes sometimes happen. Because of this DataFrames.jl performs consistency checks before doing an expensive operation (most notably before showing a data frame).
try
show(df)
catch e
show(e)
end
AssertionError("Data frame is corrupt: length of column :c (2) does not match length of column 1 (1). The column vector has likely been resized unintentionally (either directly or because it is shared with another data frame).")
We can investigate the columns to find out what happened:
collect(pairs(eachcol(df)))
5-element Vector{Pair{Symbol, AbstractVector}}:
:a => [1]
:b => [1]
:c => [1, 2]
:d => [1, 2]
:e => [1, 2]
The output confirms that the data frame df
got corrupted.
DataFrames.jl supports a complete set of getindex
, getproperty
, setindex!
, setproperty!
, view
, broadcasting, and broadcasting assignment operations. The details are explained here: http://juliadata.github.io/DataFrames.jl/latest/lib/indexing/.
Comparisons#
using DataFrames
df = DataFrame(rand(2, 3), :auto)
Row | x1 | x2 | x3 |
---|---|---|---|
Float64 | Float64 | Float64 | |
1 | 0.322901 | 0.637714 | 0.819198 |
2 | 0.21228 | 0.116272 | 0.0422936 |
df2 = copy(df)
Row | x1 | x2 | x3 |
---|---|---|---|
Float64 | Float64 | Float64 | |
1 | 0.322901 | 0.637714 | 0.819198 |
2 | 0.21228 | 0.116272 | 0.0422936 |
compares column names and contents
df == df2
true
create a minimally different data frame and use isapprox
for comparison
df3 = df2 .+ eps()
Row | x1 | x2 | x3 |
---|---|---|---|
Float64 | Float64 | Float64 | |
1 | 0.322901 | 0.637714 | 0.819198 |
2 | 0.21228 | 0.116272 | 0.0422936 |
df == df3
false
isapprox(df, df3)
true
isapprox(df, df3, atol=eps() / 2)
false
missings
are handled as in Julia Base
df = DataFrame(a=missing)
Row | a |
---|---|
Missing | |
1 | missing |
Equality test shows missing.
df == df
missing
The same object?
df === df
true
isequal(df, df)
true
This notebook was generated using Literate.jl.