SyntaxFix
Write A Post
Hire A Developer
Questions
This will work:
if 'A' in df:
But for clarity, I'd probably write it as:
if 'A' in df.columns: