P.csv内容如下
year,staock,age 1,2,3 4,5,6 3,5,6 55,67,88
获取year,staock,age特征值
import pandas as pd import numpy as np data = pd.read_csv('P.csv') s = data.keys() print(s) 结果:
Index(['year', 'staock', 'age'], dtype='object')
P.csv内容如下
year,staock,age 1,2,3 4,5,6 3,5,6 55,67,88
获取year,staock,age特征值
import pandas as pd import numpy as np data = pd.read_csv('P.csv') s = data.keys() print(s) 结果:
Index(['year', 'staock', 'age'], dtype='object')