Replacing .ix with .loc for pandas correctness