X = np.array(df_ads) # 构建特征集, 包含全部特征 X = np.delete(X, [3], axis = 1) # 删除标签 y = np.array(df_ads.sales) #构建标签集, 销售额 print ("张量X的阶:", X.ndim) print ("张量X的维度:", X.shape) print (X)