3
我想使画面就像下面:Seaborn tsplot:“索引包含重复的条目,不能重塑”尽管指数没有重复
我想用seaborn使图看起来很漂亮,并且使我更容易使用facetgrids(我有十个不同的数据集,我想在同一个图表中显示)。
我在seaborn找到的最接近的东西是tsplots。
我有数据,如下所示(500万行):
Bin_nb Sample Type Count
0 131 Exp1 Input 1
1 79 Exp2 Polymerase_II 1
2 100 Exp1 Input 2
3 173 Exp2 Input 3
4 40 Exp1 Input 1
的Bin_nb
范围为0〜200,我假装它们所代表的时间。
有在索引中没有重复:
len(df.index.drop_duplicates()) # 5e6
尽管如此,我得到的错误ValueError: Index contains duplicate entries, cannot reshape
当我尝试的命令
sns.tsplot(data=df, time="Bin_nb", unit="Sample", value="Count", condition="Type")
版本信息:
>>> sns.__version__
'0.6.0'
>>> pd.__version__
'0.17.1'
升级到seaborn'0.7'和错误仍然存在。 –