For me the issue was that I had labeled my columns with numbers instead of text.
X.columns = [str(a) for a in X.columns]