AttributeError: module 'pandas.core' has no attribute 'categorical'的解决

module ‘pandas.core’ has no attribute 'categorical’的解决
1、报错代码
AttributeError: module 'pandas.core' has no attribute 'categorical'的解决
AttributeError: module 'pandas.core' has no attribute 'categorical'的解决
2、代码寻错
AttributeError: module 'pandas.core' has no attribute 'categorical'的解决
发现pandas中没有categorical包,猜测是否因为pandas更新后没有categorical包,考虑具有与原来categorical相类似功能的包,尝试dtyples包,查看其dtyples模块的代码,果不其然(这种方法仅供参考,存在巧合)。
3、代码修正
AttributeError: module 'pandas.core' has no attribute 'categorical'的解决