SyntaxFix
Write A Post
Hire A Developer
Questions
I prefer going the long route. These are the checks I follow to avoid using a try-except clause -
Here, DATA is the suspect variable -
DATA
DATA is not None and isinstance(DATA, pd.DataFrame) and not DATA.empty