python - How to check if a column exists in Pandas - Stack Overflow

PHOTO EMBED

Mon Nov 16 2020 13:04:00 GMT+0000 (Coordinated Universal Time)

Saved by @arielvol #python

if 'A' in df.columns:
content_copyCOPY

https://stackoverflow.com/questions/24870306/how-to-check-if-a-column-exists-in-pandas