回答編集履歴

1

2023/01/07 03:04

投稿

melian
melian

スコア20655

test CHANGED
@@ -4,8 +4,8 @@
4
4
  import matplotlib.pyplot as plt
5
5
 
6
6
  train = pd.read_csv('titanic.csv')
7
- sum_survived = train.groupby(["Sex"])[["Survived"]].sum()
7
+ sum_survived = train.groupby(["Sex"])[["Survived"]].sum().T
8
- sns.barplot(data=sum_survived, x=sum_survived.index, y='Survived')
8
+ sns.barplot(sum_survived)
9
9
 
10
10
  plt.show()
11
11
  ```