我有两个不同的数组,一个是字符串,另一个是整数.我想将它们连接到一个数组中,其中每列都具有原始数据类型.我目前的解决方案(见下文)将整个数组转换为dtype = string,这看起来非常低效.
combined_array = np.concatenate((A, B), axis = 1)
是否有可能多发dtypes的combined_array时候A.dtype = string和B.dtype = int?
combined_array
A.dtype = string
B.dtype = int
python arrays types numpy
arrays ×1
numpy ×1
python ×1
types ×1