Vérifiez si l'entrée est Pandas DataFrame
if isinstance(x, pd.DataFrame):
... # do something
Real Raccoon
if isinstance(x, pd.DataFrame):
... # do something