1

是否可以在 python数据表更改stypes.int8为?stypes.int32

4

2 回答 2

3

You can easily do it:

Assume you have a DT and a field type is int32

DT = dt.Frame({'x': [1,2,3,4,5]})

and we could like to change its type from int32 to int8 as

DT['x'] = dt.int8

Here is the syntax:

DT['column'] = datatype  # (dt.int32 or dt.str32 etc etcc)
于 2020-04-27T15:05:21.997 回答
1

来自Datatable docs

顾名思义,该包与 R 的 data.table 密切相关,并试图模仿其核心算法和 API。

因此,您可以遵循这一点linklink进行数据类型转换。

于 2020-04-27T08:05:01.943 回答