Certainly, there are ways to speed this up. But first you need to find out where the bottle-neck is. This process is called 'profiling my code'. The NYTProfiler is your friend.
Once you know where your slow-up is, the solution(s) will usually be very apparent.