tknapen / nsd_access

python package to access the data of the NSD (natural scenes dataset) fMRI project
MIT License
39 stars 15 forks source link

The usage of “json_normalize” has been changed in the latest pandas version #9

Closed FunkyFrog1 closed 4 months ago

FunkyFrog1 commented 1 year ago

ImportError: cannot import name 'json_normalize' from 'pandas.io.json' (D:\anaconda3\envs\SD\Lib\site-packages\pandas\io\json__init__.py)

I use "pandas 2.1.1" in my project, and when I tried to from nsd_access import NSDAccess, I found that in the latest version, pandas used "pandas.json_normalize" instead of "pandas.io.json.json_normalize"

To fix this issue, replace from pandas.io.json import json_normalize with from pandas import json_normalize in nsda.py