Sprawdź, czy dane wejściowe to Pandas DataFrame

if isinstance(x, pd.DataFrame):
    ... # do something
Real Raccoon