How do you programmatically retrieve the number of columns in a pandas dataframe? I was hoping for something like:

df.num_columns

11 Answers
11

Leave a Reply

Your email address will not be published. Required fields are marked *