neuniversity / ALY6140

1 stars 3 forks source link

Delete particular values from columns #39

Open pr24 opened 5 years ago

pr24 commented 5 years ago

anybody know how to delete the string values from specific columns ? I am getting this error 'list' object has no attribute column(which I am performing the operation)

jingqilin commented 5 years ago

Hi, You should put the data from your list into an array or matrix, it should be worked. p.s.: np.array

NEUHU commented 5 years ago

You can try "str.replace" , for instance: df['your Factor'] = df['your factor'].str.replace('%', '') Or "str.rstrip()", like: df['your Factor'] = df['your Factor'].str.rstrip('%') I am not sure if this is what you are asking for, but you can try these and see if these work.