NumPy - numpy.char.join() 函数
-
简述
此方法返回一个字符串,其中各个字符由指定的分隔符连接。import numpy as np print np.char.join(':','dmy') print np.char.join([':','-'],['dmy','ymd'])
它的输出如下 -d:m:y ['d:m:y' 'y-m-d']
import numpy as np
print np.char.join(':','dmy')
print np.char.join([':','-'],['dmy','ymd'])
d:m:y
['d:m:y' 'y-m-d']