Conversation

python q: i may be idiot but in my data ppl entered manual numbers to a q. some of the numbers are obviously dumb. Id like to delete all dumb numbers, so any number outside of a specified range, just wanna make NaNs. all google things i try do not work. column is float64.
Show replies
Replying to
Maybe this is a dumb inefficient method (I've only done first year python) but can't you use: for i in range(len(data)): if data[i]<min or data[i]>max: data[i]=float("nan")
1
1
This Tweet was deleted by the Tweet author. Learn more
Show replies