-1
假设一个熊猫的数据帧的样子:如何提取熊猫数据框的第n行作为熊猫数据框?
X_test.head(4)
BoxRatio Thrust Velocity OnBalRun vwapGain
5 -0.163 -0.817 0.741 1.702 0.218
8 0.000 0.000 0.732 1.798 0.307
11 0.417 -0.298 2.036 4.107 1.793
13 0.054 -0.574 1.323 2.553 1.185
我怎样才能提取第三行(如ROW3)作为PD数据帧? 换句话说,row3.shape应该是(1,5)和row3.head()应为:
0.417 -0.298 2.036 4.107 1.793
你有https://stackoverflow.com/questions/16096627/pandas-select-row-of-data-frame-by-integer-index吗? – Zero
其实0已经找到了详细的相应答案 – bellum
可能重复[Pandas选择整行索引数据帧的行](https://stackoverflow.com/questions/16096627/pandas-select-row-of-data-frame-by-整数索引) – bellum