2020
12-14
12-14
Pandas中DataFrame交换列顺序的方法实现
一、获取DataFrame列标签importpandasaspdfile_path='/Users/Arithmetic/da-rnn-master/data/collectd67_power_after_test_smooth.csv'dataset=pd.read_csv(file_path)cols=list(dataset)['ps_state-stopped','ps_state-running','ps_state-blocked','ps_state-paging','ps_state-sleeping','ps_state-zombies','fork_rate','cpu-2-system','cpu-2-nice','cpu-2-steal',...]二、改变列标签为指定顺序importpa...
继续阅读 >