I am extremely new to coding, so please correct me on anything I'm misunderstanding.
I need to find a way to combine the different characters in each value into a single string of characters. The data originally came from a netcdf file that I opened in xarray. The dtype was originally |S1, but I was able to convert it to a string using .astype(str) and then transposing, and this was the result.
ncases_OFCL: 2743, nchars_basin: 2
array([['a', 'l'],
['a', 'l'],
['a', 'l'],
...,
['e', 'p'],
['e', 'p'],
['e', 'p']], dtype='<U1')
Coordinates: (0)
Attributes:
long_name :
OFCL basin
units :
Now that I've gotten to this point, is there a way to join the 'a' and 'l' and so on into just 'al'? Thank you for any help you can give!!