Python 如何使用U分析对表进行数据分析

Python 如何使用U分析对表进行数据分析,python,pandas-profiling,Python,Pandas Profiling,当我试图使用pandas\u profiling对一个sql server表进行数据分析时,抛出如下错误 已尝试在启动之前启动新进程 当前进程已完成其引导阶段 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 _

当我试图使用pandas\u profiling对一个sql server表进行数据分析时,抛出如下错误

已尝试在启动之前启动新进程 当前进程已完成其引导阶段

    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.
这是我用来运行的代码,我不知道如何解决这个问题

import pandas as pd
import pandas_profiling


df=pd.DataFrame(read)
profile=pandas_profiling.ProfileReport(df)

enter code here
我希望看到给定表的分析结果:


尝试使用多处理。冻结支持()如下:

import multiprocessing
import numpy as np
import pandas as pd
import pandas_profiling


def test_profile():
    df = pd.DataFrame(
        np.random.rand(100, 5),
        columns=['a', 'b', 'c', 'd', 'e']
    )

    profile = pandas_profiling.ProfileReport(df)
    profile.to_file(outputfile="output.html")


if __name__ == '__main__':
    multiprocessing.freeze_support()
    test_profile()