python 编程遇到的难点+debug
DataFrame、nparray和list格式之间的转换将DataFrame转化为nparraypandas.DataFrame 有values属性文档解释:Return a Numpy representation of the DataFrame.x = pd.DataFrame([[1,3],[2,4],[9,6]])y = x.valuesprint(x)print(type(x))print(y)print(type(y))输出: 0 10 1 31 2