I have a dataframe column and i need to split a column with "," and even if no "," present in the value.
Value
=====
59.5
59.5, 5
60
60,5
desired output
value1 value2
====== ======
59.5
59.5 5
60
60 5
Tried the code but getting an below error:
df['value1'], df_merge['value2'] = df['value'].str.split(',', 1).str
ValueError: not enough values to unpack (expected 2, got 1)