Data science

Too much code in this method. You can move this block into a separate method (lines 42 - 45). Also no need for the blank line 44.