初始化列表列表:
data = [[1.0, 0.635165,0.0], [1.0, 0.766586,1.0], [1.0, 0.724564,1.0],
[1.0, 0.766586,1.0],[1.0, 0.889199,1.0],[1.0, 0.966586,1.0],
[1.0, 0.535165,0.0],[1.0, 0.55165,0.0],[1.0, 0.525165,0.0],
[1.0, 0.5595165,0.0] ]
Run Code Online (Sandbox Code Playgroud)
创建 Pandas 数据框:
df = pd.DataFrame(data, columns = ['y', 'prob','y_predict'])
Run Code Online (Sandbox Code Playgroud)
打印数据框。
print(df)
Run Code Online (Sandbox Code Playgroud)
对于这个数据集,我想找到:
如何在 python 中做到这一点?