# AUTOGENERATED! DO NOT EDIT! File to edit: nbs/39_tabular.ipynb (unless otherwise specified).

__all__ = ['keyerror_in_tabular']

# Cell
from ..utils import *
from ..bug import *
from .data import *

# Cell
from ..bug import ishell,BUGBOOK, itb

def keyerror_in_tabular(etype, evalue, tb):
    stb = itb.structured_traceback(etype, evalue, tb)
    sstb = itb.stb2text(stb)
    if "pandas/" in sstb:
        return f"We don't have column '{evalue}' in the dataframe"
    else:
        return None


BUGBOOK["KeyError"] = keyerror_in_tabular