How to plot int to datetime on x axis using seaborn?

Viewed 34210

I am trying to use seaborn to plot a graph

sns.lmplot(x="when_start", y="how_long",hue= 'state',
           data=apps_pd.loc[(apps_pd['user'] == 'xavi')],lowess=True);

Where apps_pd is a dataframe. And fileds in apps_pd['when_start'] are int like 1499963856220, and same for how_long.

Result of the script

However, I got a really messy graph if I don't change the format of the data.

Is there anyway I could change the unit of x-axis to 'yyyy-mm-dd'? I want to group all my data in day level.

And also could I change the unit of y-axis to hour-min-second?

Here is the first 5 lines of my dataframe.

1 Answers
Related