Giter Site home page Giter Site logo

querytables.jl's Introduction

QueryTables.jl

Project Status: WIP – Initial development is in progress, but there has not yet been a stable, usable release suitable for the public. Build Status Build status codecov

Overview

A simple read-only table type for the Queryverse.

Installation

You can install the package at the Pkg REPL-mode with:

pkg> add QueryTables

Getting started

The main type in this package is DataTable, a data structure for tabular data. To create a new DataTable with a number of columns, just pass the columns as keyword arguments to the DataTable constructor:

julia> dt = DataTable(Name=["John", "Sally", "Jim"], Age=[23., 43., 56.], Children=[2, 0, 3])
3x3 DataTable
Name  │ Age  │ Children
──────┼──────┼─────────
John  │ 23.02
Sally │ 43.00
Jim   │ 56.03

To access an individual column by name, use the . dot syntax:

julia> dt.Age
3-element Array{Float64,1}:
 23.0
 43.0
 56.0

To access an individual row, use the normal julia index syntax:

julia> dt[2]
(Name = "Sally", Age = 43.0, Children = 0)

If you want to access the value in an individual cell, it is generally more efficient to first access the column via the dot syntax, and then select the value for a given row via indexing:

julia> dt.Name[2]
"Sally"

You can also create a new DataTable by passing any object to its constructor that implements the TableTraits.jl interface. That includes everything in the Queryverse, but also many other table types like DataFrames.jl, IndexedTables.jl etc. Every DataTable also implements the TableTraits.jl interface and can therefore be passed to any function that accepts a TableTraits.jl value.

Alternatives

QueryTables.jl is not the only julia initiative for tabular data, there are many other packages that have similar goals. Take a look at DataFrames.jl, IndexedTables.jl and TypedTables.jl (which in particular was a major inspiration for this package here). If I missed other packages, please let me know and I'll add them to this list!

Getting help

Please ask any usage question in the Data Domain on the julia Discourse forum. If you find a bug or have an improvement suggestion for this package, please open an issue in this github repository.

querytables.jl's People

Contributors

davidanthoff avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.