I have a column in my dask dataframe whose datatype is integer I want to change it to a float datatype, how can I do such an operation.
fid_price_df.head(3)
fid selling_price
0 98101 439.00
1 67022 419.00
2 131142 299.00
In the above dask dataframe I need to change the 'fid' column into float datatype.
>>>type(fid_price_df)
dask.dataframe.core.DataFrame
try this:
fid_price_df['column_name_you_want_to_convert']=fid_price_df['column_name_you_want_to_convert'].astype(float)
so in this case,
fid_price_df['fid']=fid_price_df['fid'].astype(float)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With