def _shape ( self , df ) : row , col = df . shape return row + df . columns . nlevels , col + df . index . nlevels
how to get dimenstionn of data frame python
Calculate table chape considering index levels .
def _shape(self, df):
        """
        Calculate table chape considering index levels.
        """

        row, col = df.shape
        return row + df.columns.nlevels, col + df.index.nlevels