Support feature names/types for cudf. (#4902)

* Implement most of the pandas procedure for cudf except for type conversion.
* Requires an array of interfaces in metainfo.
This commit is contained in:
Jiaming Yuan
2019-09-29 15:07:51 -04:00
committed by GitHub
parent 2fa8b359e0
commit d30e63a0a5
6 changed files with 90 additions and 25 deletions

View File

@@ -31,9 +31,10 @@ std::string PrepareData(std::string typestr, thrust::device_vector<T>* out) {
Json(Integer(reinterpret_cast<Integer::Int>(p_d_data))),
Json(Boolean(false))};
column["data"] = j_data;
Json array(std::vector<Json>{column});
std::stringstream ss;
Json::Dump(column, &ss);
Json::Dump(array, &ss);
std::string str = ss.str();
return str;