Skip to content

Commit c3ce770

Browse files
committed
Update to match seaborn API version
1 parent 8015f82 commit c3ce770

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

content/titanic/CaseStudy_Titanic-Solution.ipynb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -754,7 +754,7 @@
754754
"source": [
755755
"#How many survived\n",
756756
"f,ax=plt.subplots(figsize=(5,5))\n",
757-
"sns.countplot('Survived',data=df_titanic, ax = ax)\n",
757+
"sns.countplot(x='Survived',data=df_titanic, ax = ax)\n",
758758
"ax.set_title('Perished vs. Survived')\n",
759759
"#Not necessary, just to eliminate any output\n",
760760
"plt.show()"
@@ -857,7 +857,7 @@
857857
"source": [
858858
"#Male vs. Female\n",
859859
"f,ax=plt.subplots(figsize=(5,5))\n",
860-
"sns.countplot('Sex',data=df_titanic,ax=ax)\n",
860+
"sns.countplot(x='Sex',data=df_titanic,ax=ax)\n",
861861
"ax.set_title('Male vs. Female')\n",
862862
"plt.show()"
863863
]
@@ -961,7 +961,7 @@
961961
"source": [
962962
"#Perished vs. Survived for male/female\n",
963963
"f,ax=plt.subplots(figsize=(5,5))\n",
964-
"sns.countplot('Sex',hue='Survived',data=df_titanic,ax=ax)\n",
964+
"sns.countplot(x='Sex',hue='Survived',data=df_titanic,ax=ax)\n",
965965
"ax.set_title('Gender: Perished vs. Survived')\n",
966966
"plt.show()"
967967
]
@@ -1077,7 +1077,7 @@
10771077
"source": [
10781078
"#bar plot and seaborn countplot\n",
10791079
"f,ax=plt.subplots(figsize=(5,5))\n",
1080-
"sns.countplot('Pclass',hue='Survived',data=df_titanic,ax=ax)\n",
1080+
"sns.countplot(x='Pclass',hue='Survived',data=df_titanic,ax=ax)\n",
10811081
"ax.set_title('Pclass:Perished vs. Survived')\n",
10821082
"plt.show()"
10831083
]
@@ -2208,7 +2208,7 @@
22082208
"name": "python",
22092209
"nbconvert_exporter": "python",
22102210
"pygments_lexer": "ipython3",
2211-
"version": "3.7.1"
2211+
"version": "3.9.16"
22122212
}
22132213
},
22142214
"nbformat": 4,

0 commit comments

Comments
 (0)