daru

https://github.com/sciruby/daru

Ruby

Data Analysis in RUby

Daru::DataFrame#[]=

Insert a new row/vector of the specified name or modify a previous row.
Instead of using this method directly, use df.row[:a] = [1,2,3] to set/create
a row ':a' to [1,2,3], or df.vector[:vec] = [1,2,3] for vectors.

In case a Daru::Vector is specified after the equality the sign, the indexes
of the vector will be matched against the row/vector indexes of the DataFrame
before an insertion is performed. Unmatched indexes will be set to nil.

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


# Commit to git

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


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

hub pull-request


# Celebrate!