number of column in dataset pandas code example Example: number of column in dataset pandas len(df.columns)