numpy.char.join()


Advertisements

This method returns a string in which the individual characters are joined by separator character specified.

import numpy as np 
print np.char.join(':','dmy') 
print np.char.join([':','-'],['dmy','ymd'])

Its output is as follows −

d:m:y
['d:m:y' 'y-m-d']
numpy_string_functions.htm
Advertisements