“我正在尝试训练NN,但是在csv中使用文本时遇到了问题,所以我决定从中删除所有文本。”
“我正在尝试从csv文件中删除文本,但文本没有删除”
TransformProcess tp = new TransformProcess.Builder(schema)
.removeColumns("MSZoning","Street","Alley","LotConfig","LotShape","LandContour","RoofMatl","LotConfig",
"BsmtCond",
"Utilities","LandSlope", "Neighborhood", "Condition1", "Condition2", "BldgType",
"HouseStyle", "RoofStyle", "Exterior1st", "Exterior2nd", "MasVnrType", "ExterQual",
"ExterCond", "Foundation", "BsmtQual", "BsmtExposure",
"BsmtFinType1", "BsmtFinType2", "Heating", "HeatingQC", "CentralAir", "KitchenQual",
"Functional", "FireplaceQu", "GarageType",
"GarageFinish", "GarageQual", "GarageCond", "PavedDrive", "PoolQC", "Fence",
"MiscFeature", "SaleType", "SaleCondition","Electrical")
答案 0 :(得分:0)
您需要在TransformProcess上调用tp.build()
,然后获取生成的模式:
Schema outputSchema = tp.getFinalSchema();