def make_dataframe(table, clean=True, verbose=False, **kwargs):
if hasattr(table, '<STR_LIT>') and not callable(table.objects):<EOL><INDENT>table = table.objects<EOL><DEDENT>if hasattr(table, '<STR_LIT>') and callable(table.values):<EOL><INDENT>table = pd.DataFrame.from_records(list(table.values()).all())<EOL><DEDENT>elif isinstance(table, basestring) and os.path.isfile(table):<EOL><INDENT>table = pd.DataFrame.from_csv(table)<EOL><DEDENT>try:<EOL><INDENT>table = pd.DataFrame(table, **kwargs)<EOL><DEDENT>except (IndexError, ValueError, AttributeError, TypeError):<EOL><INDENT>table = pd.DataFrame(table)<EOL><DEDENT>if clean and len(table) and isinstance(table, pd.DataFrame):<EOL><INDENT>if verbose:<EOL><INDENT>print('<STR_LIT>')<EOL><DEDENT>for col in table.columns:<EOL><INDENT>if any_generated((isinstance(v, DATETIME_TYPES) for v in table[col])):<EOL><INDENT>table[col] = clean_series(table[col])<EOL><DEDENT><DEDENT>table = table.dropna(how='<STR_LIT:all>')<EOL><DEDENT>return table<EOL>
Coerce a provided table (QuerySet, list of lists, list of Series)
    >>> dt = datetime.datetime
    >>> make_dataframe([[1,2,3],[4,5,6]])
       0  1  2
    0  1  2  3
    1  4  5  6
    >>> make_dataframe([])
    Empty DataFrame
    Columns: []
    Index: []
    >>> make_dataframe([OrderedDict([('a', 2), ('b', 3)]), PrettyDict([('a', 4), ('b', 5)])])
       a  b
    0  2  3
    1  4  5
    >>> make_dataframe([[dt(2700, 1, 1), dt(2015, 11, 2)], [(2700 - 2015) * 365.25 + 60, 1]]).T
                                         0       1
    0  2262-04-11 23:47:16.854775+00:00  250256
    1            2015-11-02 00:00:00+00:00       1