title: How to display Pandas dataframe within a wxPython tab
body: <p>I'm trying to display a pandas Dataframe within a wxPython tab.
  I've tried other methods, like using wxPython's build in ListCtrl, but couldn't get that work, and I figured using a DataFrame would be easier.</p>
  <p>After doing a little research, this snippet of code seems to work on its own</p>
  <pre><code>import json
  import pandas as pd
  from IPython.core.display import display
  
  df = pd.DataFrame(data[&quot;downloadHistory&quot;][0])
  display(df)
  </code></pre>
  <p>Output:</p>
  <pre><code>          titles   author                 urls
  0  exampletitle1  author1  https://example.com
  1  exampletitle2  author2  https://example.com
  </code></pre>
  <p>But when inside the following tab, the output doesn't look as pretty.</p>
  <pre><code>class DownloadHistory(wx.Panel):
      def __init__(self, parent):
          wx.Panel.__init__(self, parent)
          df = pd.DataFrame(data[&quot;downloadHistory&quot;][0])
          disp = display(df)
  
          doHiLab = wx.StaticText(self, -1, &quot;DOWNLOAD HISTORY:&quot;, (10, 15))
          tableText = wx.StaticText(self, -1, str(disp), (10, 50))
  
          self.clear = wx.Button(self, label='Clear History', size=(75, 25), pos=(420, 10))
  </code></pre>
  <p>Output Example 1:</p>
  <pre><code>       titles author         urls
  0  exampletitle1  author1  https://example.com
  1  exampletitle2  author2  https://example.com
  </code></pre>
  <p>Ouput Example 2:</p>
  <pre><code>        titles  author           urls
  0  example123456789  author123456  https://example.com/
  1   exampletitle2   author2  https://example.com/12345
  </code></pre>
  <p>JSON file:</p>
  <pre><code>{
     &quot;downloadHistory&quot;: [
          {
              &quot;titles&quot;: [&quot;example123456789&quot;, &quot;exampletitle2&quot;],
              &quot;author&quot;: [&quot;author123456&quot;, &quot;author2&quot;],
              &quot;urls&quot;: [&quot;https://example.com/&quot;, &quot;https://example.com/12345&quot;]
          }
      ],
  }
  </code></pre>
  <p>Is there any reason why the output is messy within the tab and not on its own?</p>
  <p>Additionally, is there an efficient way to display a DataFrame in wxPython?</p>
  <p>I've tried researching some more, to no luck.</p>