If I were you, I'd do it this way
In [83]: df.drop('id',1).apply(lambda c: c.value_counts().to_dict())
Out[83]:
column1 {3: 2, 2: 2, 1: 1}
column2 {2: 2, 1: 2, 3: 1}
column3 {7: 3, 8: 2}
dtype: object
or
In [84]: for c in df.drop('id',1):
...: print(df[c].value_counts())
...:
3 2
2 2
1 1
Name: column1, dtype: int64 # <----- column name
2 2
1 2
3 1
Name: column2, dtype: int64
7 3
8 2
Name: column3, dtype: int64
or
you could produce your desired value_counts sequentially, convert to dataframes and write to csv:
import pandas as pd
with open('out.csv', 'w') as out:
for col in df.columns[1:]:
res = df[col].value_counts()\
.reset_index()\
.rename(columns={col: 'count', 'index': col})\
res.to_csv(out, index=False)