code: def pivot_table(self, index, columns, values='value',
                      aggfunc='count', fill_value=None, style=None):
          index = [index] if isstr(index) else index
          columns = [columns] if isstr(columns) else columns
          df = self.data
          if isstr(aggfunc):
              if aggfunc == 'count':
                  df = self.data.groupby(index + columns, as_index=False).count()
                  fill_value = 0
              elif aggfunc == 'mean':
                  df = self.data.groupby(index + columns, as_index=False).mean()\
                      .round(2)
                  aggfunc = np.sum
                  fill_value = 0 if style == 'heatmap' else ""
              elif aggfunc == 'sum':
                  aggfunc = np.sum
                  fill_value = 0 if style == 'heatmap' else ""
          df = df.pivot_table(values=values, index=index, columns=columns,
                              aggfunc=aggfunc, fill_value=fill_value)
          return df