I have read csv file using dask this way:
import dask.dataframe as dd
train = dd.read_csv('act_train.csv')
Then I would like to apply simple logic per row , that works pretty fine in pandas:
columns = list(train.columns)
for col in columns[1:]:
train[col] = train[col].apply(lambda x: x if x == -1 else x.split(' ')[1])
Unfortunately, last line of code generates the following error: Length of values does not match length of index
What am I doing wrong?