title: Unable to import modules using [dot]module
body: <p>I'm trying to make use of some parts of the <a href="https://www.statsmodels.org/dev/_modules/statsmodels/iolib/summary2.html" rel="nofollow noreferrer">Source code for statsmodels.iolib.summary2</a>. If I try to run the source code in its entirety I'm getting the error:</p>
  
  <blockquote>
    <p>ModuleNotFoundError: No module named '<strong>main</strong>.table'; '<strong>main</strong>' is not a package</p>
  </blockquote>
  
  <p>This is raised after:</p>
  
  <pre><code>from .table import SimpleTable
  </code></pre>
  
  <p>From the post <a href="https://stackoverflow.com/questions/7279810/what-does-a-in-an-import-statement-in-python-mean">What does a . in an import statement in Python mean?</a> I'm able to understand why this error is raised <em>conceptually</em> (at best), but I have no Idea how to work around it.</p>
  
  <p>What I've tried:</p>
  
  <hr>
  
  <p>From the comments we have:</p>
  
  <blockquote>
    <p>[...] It basically means the current namespace or package directory</p>
  </blockquote>
  
  <p>This made me think that it was imported from textwrap, but it doesn't seem that way. Since <code>statsmodels</code> is often imported like <code>import statsmodels.api as sm</code> i thought that it would be a similar thing with <code>Simpletable</code>, so I've tried importing it in different ways and with different combinations of statsmodels and statsmodels.compat.collections since these are also used in the beginning of the source:</p>
  
  <pre><code>from statsmodels.compat.python import (lrange, iterkeys, iteritems, lzip,
                                         reduce, itervalues, zip, string_types,
                                         range)
  from statsmodels.compat.collections import OrderedDict
  import numpy as np
  import pandas as pd
  import datetime
  import textwrap
  from .table import SimpleTable
  from .tableformatting import fmt_latex, fmt_txt
  </code></pre>
  
  <p>I've also tried to install SimpleTable (conda), but I think I'm just way off target here, so any suggestions would be great!</p>