You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Pickle error: No module named 'pandas.core.categorical' #918
I think this (below) is a problem with different pickle or different pandas versions. Does the example below work with other versions (possibly without downgrading pandas?).
Here are my versions:
openml==0.10.2
pandas==1.0.5
Python 3.7.4
And here's the dataset loading example.
import openml
dataset = openml.datasets.get_dataset(40536)
---------------------------------------------------------------------------
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-18-ddb30cada139> in <module>
1 import openml
----> 2 dataset = openml.datasets.get_dataset(40536)
3 X, y, categorical_indicator, _ = dataset.get_data(
4 dataset_format='dataframe',
5 target=dataset.default_target_attribute
~/anaconda3/lib/python3.7/site-packages/openml/datasets/functions.py in get_dataset(dataset_id, download_data, version, error_if_multiple)
528
529 dataset = _create_dataset_from_description(
--> 530 description, features, qualities, arff_file
531 )
532 return dataset
~/anaconda3/lib/python3.7/site-packages/openml/datasets/functions.py in _create_dataset_from_description(description, features, qualities, arff_file)
1021 data_file=arff_file,
1022 features=features,
-> 1023 qualities=qualities,
1024 )
1025
~/anaconda3/lib/python3.7/site-packages/openml/datasets/dataset.py in __init__(self, name, description, format, data_format, dataset_id, version, creator, contributor, collection_date, upload_date, language, licence, url, default_target_attribute, row_id_attribute, ignore_attribute, version_label, citation, tag, visibility, original_data_url, paper_url, update_comment, md5_checksum, data_file, features, qualities, dataset)
181
182 if data_file is not None:
--> 183 self.data_pickle_file = self._create_pickle_in_cache(data_file)
184 else:
185 self.data_pickle_file = None
~/anaconda3/lib/python3.7/site-packages/openml/datasets/dataset.py in _create_pickle_in_cache(self, data_file)
404 with open(data_pickle_file, "rb") as fh:
405 try:
--> 406 data, categorical, attribute_names = pickle.load(fh)
407 except EOFError:
408 # The file is likely corrupt, see #780.
ModuleNotFoundError: No module named 'pandas.core.categorical'
Yes, I think they removed the pandas.core.categorical module when moving to pandas 1.0. You can fix this issue by deleting the cached pickle file manually.
Activity
mfeurer commentedon Jul 1, 2020
Yes, I think they removed the
pandas.core.categoricalmodule when moving to pandas 1.0. You can fix this issue by deleting the cached pickle file manually.benman1 commentedon Jul 1, 2020