Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个形状为 (5,5) 的数据框,我想从第1列到第 3列中选择值,然后我想选择第 1 到第 3行并将它们转换为数组。
例如,如果这是原始数据帧:
我想获得以下作为数组。
像:df.iloc[1:4,1:4].values?
df.iloc[1:4,1:4].values