Dec-17-2017, 01:08 AM
Quote:import math
raw_data = [56.2, float('NaN'), 51.7, 55.3, 52.5, float('NaN'), 47.8]
filtered_data = []
for value in raw_data:
if not math.isnan(value):
filtered_data.append(value)
Not sure why this code doesn't work. It should filter numbers only when looped through list. Any idea?
I didn't receive any error message in my cmd, it just doesn't give any result.