I have 2 lists. One represents time and looks like
time=[datetime.datetime(2015, 1, 2, 0, 1, 2),datetime.datetime(2015, 1, 2, 0, 5, 2),datetime.datetime(2015, 1, 3, 0, 1, 53),datetime.datetime(2015, 1, 3, 0, 1, 56),datetime.datetime(2015, 1, 5, 0, 1, 2),datetime.datetime(2015, 1, 5, 0, 1, 40),datetime.datetime(2015, 1, 7, 0, 1, 2),datetime.datetime(2015, 1, 7, 0, 1, 30),datetime.datetime(2015, 1, 9, 0, 1, 2),datetime.datetime(2015, 1, 9, 0, 1, 20)]
and the other represents corresponding data points:
data=[51.024,3.2179,105.18,31.176,1.1123,1.7861,109.65,0.0,123.890,523.897]
plotting this with matplotlib is easy, but the rest of the statistics is done with seaborn and I would like to keep the visuals and use seaborn for the whole set of results. When I use seaborn.tsplot
I get the following error index contains duplicate entries, cannot reshape seaborn
. The data list does contain duplicates, but they are at different time points and cannot be removed. What am I doing wrong?
Edit: if I create pandas dataframe, I can plot the y value using sns.tsplot(y)
, but I want to be able to use my values for x-axis, not the generated values.