python3-cookbook icon indicating copy to clipboard operation
python3-cookbook copied to clipboard

请问把dataframe赋值给多个变量怎么做的,意思是每列赋值给一个变量,可以用类似1.1的方式吗

Open hahashuo opened this issue 4 years ago • 0 comments
trafficstars

比如这样的代码

import numpy as np import pandas as pd X = pd.Dataframe(np.random.rand(4,2)) a,b = X #这里的输出就是a = 0, b = 1为什么呢

hahashuo avatar Jun 30 '21 02:06 hahashuo