How do you programmatically retrieve the number of columns in a pandas dataframe? I was hoping for something like:
df.num_columns
Surprised I haven't seen this yet, so without further ado, here is:
df.columns.size