Closed Ariel0128 closed 5 years ago
import pandas as pd
rawdata = pd.read_csv('adbalanced.csv')
ncol = [2, 114, 168, 191, 331, 352, 387, 399, 875, 969, 973, 1023, 1041, 1048, 1059, 1061, 1090, 1109, 1119, 1141, 1144, 1147, 1154, 1155, 1166, 1199, 1208, 1219, 1230, 1244, 1255, 1279, 1310, 1328, 1345, 1363, 1374, 1386, 1392, 1395, 1400, 1423, 1424, 1425, 1436, 1456, 1484, 1514, 1533, 1542, 1555, 1556, 1559]
new_col = [] for i in ncol: new_col.append(i - 1)
predictors = rawdata.iloc[:, new_col]
predictors.to_csv('B1.csv')
import pandas as pd
rawdata = pd.read_csv('adbalanced.csv')
ncol = [2, 114, 168, 191, 331, 352, 387, 399, 875, 969, 973, 1023, 1041, 1048, 1059, 1061, 1090, 1109, 1119, 1141, 1144, 1147, 1154, 1155, 1166, 1199, 1208, 1219, 1230, 1244, 1255, 1279, 1310, 1328, 1345, 1363, 1374, 1386, 1392, 1395, 1400, 1423, 1424, 1425, 1436, 1456, 1484, 1514, 1533, 1542, 1555, 1556, 1559]
new_col = [] for i in ncol: new_col.append(i - 1)
predictors = rawdata.iloc[:, new_col]
predictors.to_csv('B1.csv')