Graphlab SFrame构造函数将NumPy S1 dtype转换为int

时间:2016-04-26 08:42:44

标签: python numpy graphlab

以下是一个例子:

import graphlab as gl
import numpy.random as npr    
npr.choice(['a', 'b', 'c', 'd'], size = 100, replace=True).dtype
df_so = gl.SFrame({"col1": npr.randint(low = 1, high = 3, size = 100), 
               "col2": npr.randint(low = 1, high = 10, size = 100), 
               "col3": npr.choice(['a', 'b', 'c', 'd'], size = 100, replace=True)})
df_so.column_types

我想了解:

  • 为什么?
  • 如果有办法防止这种情况发生。

0 个答案:

没有答案