1.1数组行列
import numpy as np
data_np=np.array(data)
data_col=data_np[:,2:]
data_row=data_np[]
1.2数组拼接
data_cat_col=np.concatenate((data_left, data_right), axis=1)
data_cat_row=np.concatenate((data_top, data_button), axis=0)
data_cat_row=np.row_stack((data_top, data_button))
2.1数组行列
import pandas as pd
data=pd.DataFrame(data)
//#列:取数组中最后一列之前的数据到新数组中
data_col=data[data.columns[:-1]]
//#行:取数组中的前3行到新数组中
data_row=data.iloc[:3,]
2.2数据拼接
按列拼接
按行拼接1
data_out=data_out.append(data_in)
from sklearn.utils import shuffle
data_row_random=shuffle(data_in)