I have data in different columns but I don\'t know how to extract it to save it in another variable.
index a b c 1 2 3 4 2 3 4 5
With pandas,
wit column names
dataframe[['column1','column2']]
to select by iloc and specific columns with index number:
dataframe.iloc[:,[1,2]]
with loc column names can be used like
dataframe.loc[:,['column1','column2']]