<SYSTEM_TASK:>
Given the following text problem statement, write Python code to implement the functionality described below in problem statement
<END_TASK>
<USER_TASK:>
Problem:
I'm trying to slice a PyTorch tensor using an index on the columns. The index, contains a list of columns that I want to select in order. You can see the example later.
<ASSISTANT_TASK:>
Python Code:
import numpy as np
import pandas as pd
import torch
idx, B = load_data()
C = B.index_select(1, idx)
<END_TASK>