title: How to align a single cell in reportlab Table
body: <p>I am Creating a table with <a href="/questions/tagged/reportlab" class="post-tag" title="show questions tagged &#39;reportlab&#39;" rel="tag">reportlab</a>, I want to align a single cell (to the right) in the following table:</p>
  
  <p><a href="https://i.stack.imgur.com/KyOVa.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/KyOVa.png" alt=""></a></p>
  
  <p>I want to align the cell containing "Occupation" to right</p>
  
  <p>This is my code:</p>
  
  <pre><code>studentProfileData = [
                  ['Application Form No', ''],
                  ['Name', userData['studentDetails']["firstName"] + " " +userData['studentDetails']["lastName"]],
                  ['Course opted for', userData['courseDetails']["courseOptedFor"]],
                  ['Specific Course Name', courseMapping["Name"]],
                  ['Category', userData['studentDetails']['caste']],
                  ['Religion', userData['studentDetails']['religion']],
                  ['Fathers'+ "'" +'s Name', userData['studentDetails']['religion']],
                  ['Occupation', userData['studentDetails']['fOccupation']],
                  ['Phone No', ""],
                  ['Term', ""]
              ]
  
          colwidths = [3 * inch, 1.5 * inch, inch]
  
          # Two rows with variable height
          rowheights = [.5*inch] * len(studentProfileData)
          studentProfile = Table(studentProfileData, colwidths, rowheights, hAlign='LEFT')
  
          studentProfile.setStyle(TableStyle([
                  ('ALIGN', (0, 0), (0, -1), "LEFT"),
                  ('FONTSIZE', (0,0), (-1, -1), 13),
              ]))
  
          parts = [ page1Head, studentProfile]
  </code></pre>