daru

https://github.com/sciruby/daru

Ruby

Data Analysis in RUby

Daru::DataFrame#map

Map over each vector or row of the data frame according to
the argument specified. Will return an Array of the resulting
elements. To map over each row/vector and get a DataFrame,
see #recode.

== Description

The #map iterator works like Array#map. The value returned by
each run of the block is added to an Array and the Array is
returned. This method also accepts an axis argument, like #each.
The default is :vector.

== Arguments

* +axis+ - The axis to map over. Can be :vector (or :column) or :row.
Default to :vector.

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-map-for-pr


# Commit to git

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


# 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-map-for-pr

hub pull-request


# Celebrate!