I have data in different columns but I don't know how to extract it to save it in another variable. 我在不一樣的列中有數據,可是我不知道如何提取數據以將其保存在另外一個變量中。 spa
index a b c 1 2 3 4 2 3 4 5
How do I select 'a'
, 'b'
and save it in to df1? 如何選擇'a'
, 'b'
並將其保存到df1? .net
I tried 我試過了 code
df1 = df['a':'b'] df1 = df.ix[:, 'a':'b']
None seem to work. 彷佛沒有任何工做。 ip