daru

https://github.com/sciruby/daru

Ruby

Data Analysis in RUby

Daru::DataFrame.crosstab_by_assignation

Generates a new dataset, using three vectors
- Rows
- Columns
- Values

For example, you have these values

  x   y   v
  a   a   0
  a   b   1
  b   a   1
  b   b   0

You obtain
  id  a   b
   a  0   1
   b  1   0

Useful to process outputs from databases

Source | Google | Stack overflow

Edit

git clone [email protected]:sciruby/daru.git

cd daru

open lib/daru/dataframe.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Daru--DataFrame-crosstab_by_assignation-for-pr


# Commit to git

git add lib/daru/dataframe.rbgit commit -m "better docs for Daru::DataFrame.crosstab_by_assignation"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Daru--DataFrame-crosstab_by_assignation-for-pr

hub pull-request


# Celebrate!