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