Closed
Description
Code Sample
kyle = pd.DataFrame({'foo':np.random.randint(0,100,100),'boo':np.random.randint(0,100,100)})
kyle.loc[:,'fooCut'] = pd.qcut(kyle.loc[:,'foo'], np.arange(0,1.1,.1))
kyle.loc[:,'booCut'] = pd.qcut(kyle.loc[:,'boo'], np.arange(0,1.1,.1))
print(kyle.footCut.dtype)
pd.crosstab(kyle.fooCut,kyle.booCut)
Problem description
According to the documentation and previous versions of Pandas, pd.Crosstab
handled categorical variables returned by pd.qcut
but in version .24.2 pd.crosstab throws a TypeError even though both columns agree with the dtype presented in the documentation