def description_length(data, log_transform=True):
    data['description_length'] = 0
    for idx in data.index:
        d = data.description[idx]
        if d == '__missing__':
            data.description_length[idx] = 0
        else:
            data.description_length[idx] = len(d.split())
    
    if log_transform:
        data.description_length = np.log(data.description_length + 1)
        
    return data
Create a new feature description_length based on the number of words in
dataset/ETHPy150Open theusual/kaggle-seeclickfix-ensemble/Miroslaw/data_transforms.py/description_length