Hopefully this works for all versions of pandas...