String values replace in python data frame
0
0
Entering edit mode
2.2 years ago
jan97 • 0

Hi , I have a data set with coumn named "value" and name of the component as an another column. I wanted to do a distribution plot but my value colum contain a lot of strings like '. ' , '?' , '>' , '< ' . How do I get rid of them? I tried the replace method and it did not work. Can somebody help me to transform it in to a float data type?

floatconversion float string python • 775 views
ADD COMMENT
0
Entering edit mode

Hello,

I tried the replace method and it did not work.

How do you perform the replacement? (please show your code)

How does it fails? (please show the error stack)

(An example of input data and expected output will help too!)

ADD REPLY
0
Entering edit mode

I tried this method on a test file

ADD REPLY
0
Entering edit mode

And this method too. But both does not get rid of the string values

ADD REPLY
0
Entering edit mode

This is not a bioinformatics question. Better ask this in a forum like Stack Overflow (but try googling it first, since this is a pretty trivial one).

ADD REPLY

Login before adding your answer.

Traffic: 3008 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6