Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

In trying to depict change in vision over time using Python's seaborn lineplot, two problems presented themselves.

Firstly, the data representing a person's vision at a given point in time is not in the form of an integer, as seen below in the dataset. It is a string in the form of a fraction, with the distance at which the letter is read as the numerator and the distance at which it ought to be read as the denominator (for example 20/20 being good and 20/100 worse). NLP (no light perception) is the worst possible outcome, while LP (light perception) is next best. In cases where the vision is so low that no letters can be made out, HM is used for the ability to see Hand Movement, followed by CF for Counting Fingers. The symbol n/a is assumed to mean the patient was not available.

Second, the way that time is represented in the columns: VA before K pro (Visual Acuity before surgery), VA 0-30d (Visual Acuity 0 - 30 days) etc.

How do I turn these values into integers so I can depict the change in vision over time with a seaborn lineplot? I would like the VA data on the y axis and Time on the x axis so as to depict a decrease in vision over time.

I appreciate the help

dataset of vision changes over time

question from:https://stackoverflow.com/questions/65943238/turning-strings-into-integers-for-a-lineplot

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
133 views
Welcome To Ask or Share your Answers For Others

1 Answer

Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...