我正在尝试使用h2o导入excel文件,但显然它仅适用于.csv文件,此外,.xls文件还有其他功能。是否可以加载这种格式的文件?。
77
答案 0 :(得分:0)
您好,您可以使用常规的 read.xlsx 读取excel文件,然后使用转换为h2o数据帧
<p ng-repeat="category in categoryList">
<input type="button" ng-model="category.cID" name="name" ng-value="{{category.cID}}"/>{{category.categoryTitle}}
<div ng-repeat="category in categoryList">
<div ng-repeat="recipe in category.recipes" ng-model="recipe.rID"> {{recipe.recipeTitle}}</div></div>
</p>
[
{
"cID": 1,
"categoryTitle": "Main Dishes",
"recipes": [
{
"rID": 1,
"cookTime": 30,
"description": "a delicious fried chicken",
"recipeTitle": "Fried Chicken"
}
]
},
{
"cID": 2,
"categoryTitle": "Desert",
"recipes": [
{
"rID": 2,
"cookTime": 40,
"description": "a delicious apple pie",
"recipeTitle": "Apple Pie"
}
]
}]
#创建h2o数据框
答案 1 :(得分:0)
这对我有用:
train_h2o <- as.h2o(df)
答案 2 :(得分:0)
另一个选项是rio: `
library(rio)
data<-rio::import("C:/Users/USER/Desktop/iris.csv")
h2o.init()
h2o_data<-as.h2o(data)
`