In my case, there was a column of data that had mixed data types - numbers stored as text mixed with integers. Removing that column (and I assume reformatting) fixed this.