Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/arrays/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/extjs/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将数据帧转换为要在python函数中传递的格式_Python_Arrays_List_Format_Random Forest - Fatal编程技术网

将数据帧转换为要在python函数中传递的格式

将数据帧转换为要在python函数中传递的格式,python,arrays,list,format,random-forest,Python,Arrays,List,Format,Random Forest,我对python有点陌生,正在研究将数组转换为需要在函数中传递的格式的需求 array([['max_depth', 25], ['min_samples_leaf', 1], ['min_samples_split', 2], ['n_estimators', 300]], dtype=object) 所需格式: RandomForestClassifier(**random_state = 1,

我对python有点陌生,正在研究将数组转换为需要在函数中传递的格式的需求

array([['max_depth', 25],
       ['min_samples_leaf', 1],
       ['min_samples_split', 2],
       ['n_estimators', 300]], dtype=object)
所需格式:

RandomForestClassifier(**random_state = 1,
                                  n_estimators = 300,
                                  max_depth = 25, 
                                  min_samples_split = 2,  min_samples_leaf = 1**)
第二个灰色区域是我喜欢的值数组中的灰色区域,另外random_state=1

有人能帮忙吗