Renaming variables in H2O frame

587 views
Skip to first unread message

jij...@gmail.com

unread,
Feb 20, 2017, 10:30:15 AM2/20/17
to H2O Open Source Scalable Machine Learning - h2ostream
Apologies H2O team if I've missed the answer on this somewhere - how can I rename variable name(s) on an H2O frame that has already been parsed?
If there is a way to do this I'd love an python code example.

Many thanks!

Erin LeDell

unread,
Feb 22, 2017, 12:51:17 AM2/22/17
to jij...@gmail.com, H2O Open Source Scalable Machine Learning - h2ostream

There are a few ways to do this (and actually a few different aliases to do the same thing, but I use the "columns" method since that's the name they use in Pandas). 

# replace the whole header
mydata.columns = ["colA", "colB"]

# replace a specific value
mydata.columns[5] = "colE"

-Erin
-- 
Erin LeDell Ph.D.
Statistician & Machine Learning Scientist | H2O.ai
Reply all
Reply to author
Forward
0 new messages