sort dataframe on column pandas
(actually interesting, google gives me the `DataFrame.sort_values` documentation page as the first hit for that one, SO is second but you get the idea)
Answer: read the code, step through it on paper, use a debugger and read the documentation related to environment. Even now it is fairly easy to find circumstances where SO, or the web in general, gives no help if you stray outside of common languages or technology.
PS Good advice is - there is nothing wrong with the compiler!
A combination of thorough logging throughout the codebase at various levels of detail, one off print statements, then once it's narrowed down to a specific chunk of code reading it intently and finally if that doesn't work fire up a debugger and step through it.