My dataframe is,
created_at text
2017-03-01 00:00:01 power blah blah
2017-03-01 00:00:11 foo blah blah
2017-03-01 00:01:01 bar blah blah
2017-03-02 00:00:01 foobar blah blah
2017-03-02 00:10:01 hello world
2017-03-02 01:00:01 power blah blah
created_at is my index and its type is datetime64 which I can slice day by day easily. What I want to plot is that total number of entries day by day.
I separate this dataframe into its category, and plot them in one graph. But I think there is better way to do without having multiple dataframes
a = df[df["text"].str.contains("power")]
b = df[df["text"].str.contains("foo")]
c = df[df["text"].str.contains("bar")]
fig = plt.figure()
ax = fig.add_subplot(111)
df.groupby(df["created_at"].dt.date).size().plot(kind="bar", position=0)
a.groupby(a["created_at"].dt.date).size().plot(kind="bar", position=0)
b.groupby(b["created_at"].dt.date).size().plot(kind="bar", position=0)
c.groupby(c["created_at"].dt.date).size().plot(kind="bar", position=0)
plt.show()
I am learning Seaborn, so if solution is related to Seaborn, it would be nice, but it does not have to stick to it. Thanks in advance!

df.groupby('category'). Otherwise, the best you can do to clean up your code is use a for loop.