Does DolphinDB have an equivalent method to Python join?

Question:

In Python, I can join all elements into a string separated by a string separator with method join().

>>> ','.join(["{}D".format(i) for i in range(1,6)])

'1D,2D,3D,4D,5D'

How can I implement the function equivalent to join in DolphinDB?

Asked By: ajldfa

||

Answers:

You may try function concat to form a string. The equivalent function can be implemented with the following script:

concat(string(1..5) + "D", ',')

The output is

1D,2D,3D,4D,5D
Answered By: jinzhi
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.