with_Feature_1_array = train_df~train_dfFeature_1isnastackvalueswithout_Feature_1_array = train_dftrain_dfFeature_1isnastackvalues解释上述代码
上述代码将训练数据集中的"Feature_1"列不为空的部分,通过stack函数转换为一维数组with_Feature_1_array;将"Feature_1"列为空的部分,也通过stack函数转换为一维数组without_Feature_1_array。其中,"~"表示逻辑非,即选取"Feature_1"列不为空的部分。
原文地址: https://www.cveoy.top/t/topic/fhdZ 著作权归作者所有。请勿转载和采集!