Skip to content
Advertisement

Splitting dataframe based on Floating value in python

I tried to takeout decimal values based on value present before decimal point .I have data frame like below,

JavaScript

Expected output,

JavaScript

How can i achieve this using pands,…

Advertisement

Answer

If data is a string:

JavaScript

if it is a float:

JavaScript

output:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement