What would be the best way to convert a numerical column containing float AND unit as in :
df = pd.DataFrame(["211.301 MB","435.5 GB","345.234 Bytes"])
expected output in Bytes for example:
211.301*1024*1024 = 221565157.376
Many questions like this one : Reusable library to get human readable version of file size?
are showing ways of doing the opposite : convert number to human readable. How to convert human readable to float ?
Is there a more efficient way than splitting :
spl = pd.DataFrame(dataf['Total_Image_File_Size'].str.split(' ',expand=True))
and then parsing the units column with multiples if's ?
Thanx