osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

pandas split and melt()


Update.

Option 1. - This annihilates all text in the column leaving nothing.

completed_tasks['Consultant'] = completed_tasks['Consultant'].str.rstrip('.#123')


Option 2. - returns unhashable series list.

output = completed_tasks[completed_tasks['Consultant']].str.contains(r'/\b[^\d\W]+\b/g')

neither option works as the column is a list.

Thanks

Sayth