Update to handle new pandas version