title: Conversion of a Dataframe to a Tensor
body: <p>I have a dataframe lets say a shape [10,4] in which column 3 and 4 of shape[1,246]. How can I convert it or let say reshape it in such a way that it can be converted into a proper tensor.</p>
  <p>Problem in brief:-
  I am actually having a dataset with shape [10,2]  which i am using for bert to train. After tokenising one of its column with bert tokenizer i get input_ids of shape [1,23] which is saved as a new column in the dataframe changing the shape as [10,3] where 3 column is of shape[1,23]. Now I want to feed this to my bert model to train for which i neeed to convert it into a tensor. Help me out with the best approach for this.</p>
  <p>The below image attached is can help you out to understand what kind of
  problem I am facing.</p>
  <p>This whole dataframe is of shape[5000,4] where as the element column[input_ids] array has shape [1,56] where 56 is the maximum tokeized words.
  <a href="https://i.stack.imgur.com/PwAMG.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/PwAMG.jpg" alt="enter image description here" /></a></p>