Short version: So, the gist of this is that I want to truncate list by numerical value and can’t seem to do it. I’ve been looking for solutions by myself for a bit, but since this project is a bit time sensitive and I am a total noob, I’ve come to you for help.
Long version: I have a data set from a poll, in which answers are coded by 1, 2, …, 7, 99 with 99 being the value assinged to people who did not answer a particular question. The data was provided as a .csv file, from which I was able to extract the answers in form of a list of the form
data = [ [ 2.0, 3.0, …] ],
thus a list, which contains the possible values as floats within a list. To solve this problem, I tried to remove the undesired 99 values using the list.remove command, however, since data is a list within a list, I can’t use that command and for some reason, I can’t use *data.remove(99.0) either, as starred expressions are not allowed. Any ideas how to either turn data into something like
data = [ 2.0, 3.0, …]
so the list.remove command can do its magic or how to truncate data as it is?
Thank you in advance.
Edit: Thank you, Hexbear, for being a helpful community even to total scrubs who might ask redundant questions that can be solved by a quick google search!