Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Mastering Julia

You're reading from  Mastering Julia

Product type Book
Published in Jul 2015
Publisher
ISBN-13 9781783553310
Pages 410 pages
Edition 1st Edition
Languages

Data arrays and data frames


Users of R will be aware of the success of data frames when employed in analyzing datasets, a success which has been mirrored by Python with the pandas package. Julia too adds data frame support through use of a package DataFrames, which is available on GitHub, in the usual way.

The package extends Julia's base by introducing three basic types:

  • NA: An indicator that a data value is missing

  • DataArray: An extension to the Array type that can contain missing values

  • DataFrame: A data structure for representing tabular datasets

It is such a large topic that we will be looking at data frames in some depth when we consider statistical computing in Chapter 4, Interoperability.

However, to get a flavor of processing data with these packages:

julia> Pkg.add("DataFrames")
# if not already done so, adding DataFrames will add the DataArray and Blocks framework too.
julia> using DataFrames
julia> d0 = @data([1.,3.,2.,NA,6.])
5-element DataArray{Float64,1}:
 1.0
 3.0
...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}