Pandas indexing error with marine

I have a pandas framework that I am trying to create a tsplot with a seabed and I am getting duplicate index errors. My question is twofold. Firstly, when I look at the data, there are no duplicate indices (df example is given below):

          BOLD campaign  time      type
0     2.735430  6041148     3   Default
1     1.356943  6041148     3      None
2          NaN  6041148     3  Vertical
3     9.550452  6013866     6   Default
4     1.000000  6013866     6      None
5          NaN  6013866     6  Vertical
6   322.675089  6086810     8   Default
7     1.508849  6086810     8      None
8   773.393385  6086810     8  Vertical
9    43.396084  6046619    10   Default
10   26.124405  6046619    10      None
11         NaN  6046619    10  Vertical
12  103.955111  6065909    10   Default
13    1.000000  6065909    10      None
14         NaN  6065909    10  Vertical
15    9.744664  6013866     9   Default
16    9.031970  6013866     9      None
17         NaN  6013866     9  Vertical
18   10.980322  6065742     8   Default
19    0.803821  6065742     8      None

      

However, when I go to plotting this data block with

sns.tsplot(df, time="time", unit="campaign", condition="type", value="BOLD")

      

I get

ValueError: Index contains duplicate entries, cannot reshape

      

Can someone explain why this is? I do not see any duplicate records (or indexes). I also tried using drop_duplicates and get the same result

+3


source to share





All Articles