2
私は何かを非常に簡単にしようとしています。私は間違いがないと確信しています。私は、データフレームを印刷するときpandasとseaborn tsplotの問題
import pandas as pd
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
CrizWT = 134.2
CrizWT2 = 199.4
df = pd.DataFrame(columns = ('IC50', 'Cell line', 'Drug', 'Time point'))
df = df.append(pd.DataFrame([ [(4673/CrizWT), 'line 2', 'Criz', 1], \
[(919/CrizWT), 'line 2', 'Criz', 3], \
[(975.5/CrizWT), 'line 2', 'Criz', 7], \
[(164.2/CrizWT), 'line 2', 'Criz', 14], \
[(126.8/CrizWT), 'line 2', 'Criz', 21], \
[(2474/CrizWT), 'line 8', 'Criz', 1], \
[(565.8/CrizWT), 'line 8', 'Criz', 7], \
[(1368/CrizWT), 'line 8', 'Criz', 14], \
[(299.1/CrizWT), 'line 8', 'Criz', 21], \
[(395.5/CrizWT2), 'line 1', 'Criz', 1], \
[(2071/CrizWT2), 'line 1', 'Criz', 3], \
[(338.4/CrizWT2), 'line 1', 'Criz', 7], \
[(322.8/CrizWT2), 'line 1', 'Criz', 14], \
[(259.9/CrizWT2), 'line 1', 'Criz', 21], \
[(483.1/CrizWT2), 'line 3', 'Criz', 1], \
[(539.6/CrizWT2), 'line 3', 'Criz', 3], \
[(231.3/CrizWT2), 'line 3', 'Criz', 7], \
[(215.5/CrizWT2), 'line 3', 'Criz', 14], \
[(291.5/CrizWT2), 'line 3', 'Criz', 21]], \
columns = ('IC50', 'Cell line', 'Drug', 'Time point')))
print(df)
sns.tsplot(time = 'Time point', value = 'IC50', condition = 'Cell line', data = df)
plt.show()
はそれが正常に見える:
IC50 Cell line Drug Time point
0 34.821162 line 2 Criz 1
1 6.847988 line 2 Criz 3
2 7.269001 line 2 Criz 7
3 1.223547 line 2 Criz 14
4 0.944858 line 2 Criz 21
5 18.435171 line 8 Criz 1
6 4.216095 line 8 Criz 7
7 10.193741 line 8 Criz 14
8 2.228763 line 8 Criz 21
9 1.983450 line 1 Criz 1
10 10.386158 line 1 Criz 3
11 1.697091 line 1 Criz 7
12 1.618857 line 1 Criz 14
13 1.303410 line 1 Criz 21
14 2.422768 line 3 Criz 1
15 2.706118 line 3 Criz 3
16 1.159980 line 3 Criz 7
17 1.080742 line 3 Criz 14
18 1.461886 line 3 Criz 21
しかしseaborn tsplotが空である
は、ここで全体のコードです! (軸は正しく表示されますが、プロットはありません)。
思考?
パンダ/海の学習曲線が続いています。