Q:

How to plot in python for count of repeated text

I am trying to plot my data-frame using seaborn and matplotlib, but getting error like cannot convert string to float.
My data is like:
ID     |  Status     | Date | Columns|
-------+-------------+------+--------+
28     |  ACTIVE     |      |        |  
29     |  ACTIVE     |      |        |
49623  |  TERMINATED |      |        |
49624  |  TERMINATED |      |        |
49625  |  TERMINATED |      |        |

For what I have tried so far:
df_count = df.apply(pd.value_counts)
plt.plot(df_count)
where df_count looks like
           |STATUS|
-----------+------+
ACTIVE     |38537 |
TERMINATED |1185  |

When trying to do sns.barplot(df) it gives following error:

unsupported operand type(s) for +: 'int' and 'str'

And trying to do plt.plot(df) it gives following error:

ValueError: could not convert string to float: '12/31/2014 0:00'

My python plotting seems to be quite zero please suggest.

A:

I think you have to specify the x and y. Please try:
sns.barplot(x=df_count.index,y=df_count.Status) 
sns.plt.show()
-edit
test.csv:
,STATUS
ACTIVE,38537
TERMINATED,1185

code:
import pandas as pd
import seaborn as sns

df = pd.read_csv('test.csv', delimiter=',')
df.index.names = ['Type']

sns.barplot(x=df.index,y=df.STATUS)
sns.plt.show()

output:

