Python throw this error complaining that it can not found the attribute new_block on your current pandas.core.internals.blocks because in order to pickle load an object, it has to use the exact same class used for dumping the pickle. This is exactly your case: Having dumped the pickle with Pandas v1.3.x and try to load the pickle with Pandas v1.2.x
I was using pyspark on AWS EMR (4 r5.xlarge as 4 workers, each has one executor and 4 cores), and I got AttributeError: Can't get attribute 'new_block' on <module 'pandas.core.internals.blocks'. Below is a snippet of the code that threw this error:
16.07.2021 · Python changed its pickle protocol to 4 in python 3.4 to 3.7 and again changed it to protocol=5 in python 3.8. How do I open older pickled files in python 3.8? I tried: >>>...
24.10.2018 · AttributeError: module 'pandas' has no attribute 'core' - Pandas can't be imported #23325 HarveySummers opened this issue Oct 25, 2018 · 5 comments Milestone
Sep 06, 2021 · AttributeError: Can’t get attribute ‘new_block’ on <module ‘pandas.core.internals.blocks’ from ‘C:\Users\esoyqnu\anaconda3\lib\site-packages\pandas\core\internals\blocks.py’>可能是产生数据的服务器和分析数据的本地pandas版本不一致。
06.09.2021 · AttributeError: Can’t get attribute ‘new_block’ on <module ‘pandas.core.internals.blocks’ from ‘C:\Users\esoyqnu\anaconda3\lib\site-packages\pandas\core\internals\blocks.py’>可能是产生数据的服务器和分析数据的本地pandas版本不一致。所以数据还是存csv啊json这种宇宙通用的格式比较好,拿出来之后再做处理。
Loading pickled data received from untrusted sources can be unsafe. See here ... See also. DataFrame.to_pickle. Pickle (serialize) DataFrame object to file.
... line 2, in <module> AttributeError: Can't get attribute 'new_block' on <module 'pandas.core.internals.blocks' from '/opt/anaconda3/lib/python3.8/site- ...