def _table_info(self, buf=None):
    metrics = [self.count().name('nrows')]
    for col in self.columns:
        metrics.append(self[col].count().name(col))

    metrics = self.aggregate(metrics).execute().loc[0]

    names = ['Column', '------'] + self.columns
    types = ['Type', '----'] + [repr(x) for x in self.schema().types]
    counts = ['Non-null #', '----------'] + [str(x) for x in metrics[1:]]
    col_metrics = util.adjoin(2, names, types, counts)

    result = ('Table rows: {0}\n\n'
              '{1}'
              .format(metrics[0], col_metrics))

    if buf is None:
        import sys
        sys.stdout.write(result)
        sys.stdout.write('\n')
    else:
        buf.write(result)
Similar to pandas DataFrame.info. Show column names, types, and null
dataset/ETHPy150Open cloudera/ibis/ibis/expr/api.py/_table_info