在pycharm或windows终端上执行Pandas分析时显示此错误
Pycharm latest
Python version 3.6 Windows 7 Pandas profiling 1.4
pandas_profiling.ProfileReport(df) :
RuntimeError: An attempt has been made to start a new process before the current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your child processes and you have forgotten to use the proper idiom in the main module: if __name__ == '__main__': freeze_support() ... The "freeze_support()" line can be omitted if the program is not going to be frozen to produce an executable.
所以这个问题的解决方法很简单,如下所示:
在我的代码中添加了一个main,然后在最后调用if name语句来运行。这很快就解决了我的问题。
相关问题 更多 >
编程相关推荐