daru
https://github.com/sciruby/daru
Ruby
Data Analysis in RUby
Daru::DataFrame#rename_vectors
Renames the vectors
== Arguments
* name_map - A hash where the keys are the exising vector names and
the values are the new names. If a vector is renamed
to a vector name that is already in use, the existing
one is overwritten.
== Usage
df = Daru::DataFrame.new({ a: [1,2,3,4], b: [:a,:b,:c,:d], c: [11,22,33,44] })
df.rename_vectors :a => :alpha, :c => :gamma
df.vectors.to_a #=> [:alpha, :b, :gamma]Edit
git clone [email protected]:sciruby/daru.git
cd daru
open lib/daru/dataframe.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Daru--DataFrame-rename_vectors-for-pr
# Commit to gitgit add lib/daru/dataframe.rbgit commit -m "better docs for Daru::DataFrame#rename_vectors"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Daru--DataFrame-rename_vectors-for-pr
hub pull-request
# Celebrate!