Home > OS >  Does DolphinDB have an equivalent method to Python join?
Does DolphinDB have an equivalent method to Python join?

Time:11-07

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?

CodePudding user response:

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
  • Related