title: Python dataframe row and column
body: <p>I am a newB python modeller and currently experiencing some issues with a line of code which may be very basic for a lot of you.</p>
  
  <p>I am using python 2.7 and have successfully used xlwings to copy a named range from external workbook in to the pd.dataframe format. Everything thing works fine except the df.index and df.columns. Currently the code is assigning 1 to n (based on number of rows and columns) numbers as a index and column names. </p>
  
  <p>is there a way, I use the first column values of my imported data as df.index and first row as df.column?</p>
  
  <p>Can some one please assist me with getting something like this:</p>
  
  <pre><code> df = pd.DataFrame(myExcelRange, df.index = 'first column values', df.columns = 'first row values')
  </code></pre>
  
  <p>The shape and name of myExcelRange could be different each time.</p>
  
  <p>Any guideline will be much appreciated.</p>
  
  <p>Example:</p>
  
  <p><strong>> myExcelRange</strong>      </p>
  
  <pre><code>ITEM    Dan Jane    Fan 
  A   77  78  40
  B   89  53  72  
  C   20  19  79  
  D   81  54  93  
  E   77  76  99  
  </code></pre>
  
  <p><strong>pandas is returning</strong>             </p>
  
  <pre><code>    0   1   2   3
  0   ITEM    Dan Jane    Fan
  1   77  78  40  0
  2   89  53  72  0
  3   20  19  79  0
  4   81  54  93  0
  5   77  76  99  0
  </code></pre>
  
  <p><strong>desired</strong></p>
  
  <pre><code>ITEM    Dan Jane    Fan 
  A   76  89  100 
  B   59  72  24  
  C   69  73  19  
  D   70  92  43  
  E   65  94  30  
  </code></pre>