Pandas profiling not able to import due to error cannot import name DataError from 'pandas.core.base'
pandas profiling 是個好用的探索式資料分析工具,多好用,一行生成報表
pandas_profiling.ProfileReport(df)
But ....
工作環境:
windows 10 home
Anaconda:
python 3.11, 3.10
jupyter notebook 這個還是先裝吧
pandas
openpyxl 和 pandas 一起裝
pandas-profiling 再裝這個 ( conda install -c conda-forge pandas-profiling )
錯誤訊息:
Pandas profiling not able to import due to error cannot import name DataError from 'pandas.core.base'
不引用 pandas-profiling 可以透過 pandas 取用資料的,所以問題出在引用 pandas-profiling ,由於之前遇過 python 版本太新造成問題,先裝一個之前版本(3.10)的環境,然後重裝一次所須的套件,重新執行 jupyter notebook 還是出現上述的錯誤訊息…
股溝後發現可以裝 ydata-profiling 然後可以用之前的程式碼來執行一行報表,只是會出現警示訊息( 建議改用 ydata-profiling 之類的… ),至少 3.10 版可以用了…
3.11 版在使用 anaconda 本身的套件管理所提供的套件,Apply 之後過了很久(3.10版也要很久)還是出現 conflict 的訊息(就是沒辦法裝的意思)…懶得折騰了…
收工!
留言
張貼留言