how to print a certain cou,ns in pd dataframe code example
Example 1: python- number of row in a dataframe
index = df.index
number_of_rows = len(index)
Example 2: python count variable and put the count in a column of data frame
df['freq'] = df.groupby('myvar')['myvar'].transform('count')