sensortoolkit icon indicating copy to clipboard operation
sensortoolkit copied to clipboard

Error "ValueError: cannot reindex on an axis with duplicate labels" in CreateReport

Open MartinaCasari opened this issue 2 years ago • 1 comments

Hello, thank you very much for your library. I've been capable of using it after some troubles.
At the time of creating the report, I receive the following message:

ValueError: cannot reindex on an axis with duplicate labels

In file and line:

File "[...]\sensortoolkit\plotting_performance_metrics.py", line 420, in performance_metrics sns.swarmplot(x='Averaging Interval', y=metric_name,

I suggest putting a

stats_df.reset_index(inplace=True, drop=True)

before that line.

Best regards, Martina Casari

MartinaCasari avatar Jan 24 '23 12:01 MartinaCasari

I believe this unfortunately does not solve the issue. The report generates; however, it is not accurate. I will work on trying to solve this issue in upcoming releases. However, a work around is to downgrade the following packages to the listed versions

  1. pandas==1.3.5
  2. seaborn==0.11.2

using pip install

menaka-kumar avatar Feb 13 '23 19:02 menaka-kumar