Dataframe column value handling problem

clipboard.png
the value in the type_pay column does not have a clear number of spaces, so the subsequent mapping processing is not successful. In order to achieve my mapping purpose, what should I do to reduce the type_pay column type value? Ask everyone for advice

Mar.02,2021

def tranf (x):

if x.startswith(('','','','','','','','')):
    x= 'a'
elif x.startswith(('','','')):
    x = 'b'
elif x.startswith(('','')):
    x = 'c'
elif x.startswith(('')):
    x = 'd' 
return x

train_order_later ['type_pay1'] = train_order_later [' type_pay']. Apply (tranf)
train_order_later ['type_pay1']. Value_counts ()

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b30a46-2bd48.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b30a46-2bd48.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?