1
0
mirror of https://github.com/gsi-upm/sitc synced 2024-11-13 02:12:28 +00:00

Updated to last version of seaborn

This commit is contained in:
cif 2022-03-07 12:57:17 +01:00
parent d99eeb733a
commit df6449b55f

View File

@ -367,7 +367,7 @@
"outputs": [],
"source": [
"# Now we visualise age and survived to see if there is some relationship\n",
"sns.FacetGrid(df, hue=\"Survived\", size=5).map(sns.kdeplot, \"Age\").add_legend()"
"sns.FacetGrid(df, hue=\"Survived\", height=5).map(sns.kdeplot, \"Age\").add_legend()"
]
},
{
@ -567,7 +567,7 @@
"outputs": [],
"source": [
"# Plot with seaborn\n",
"sns.countplot('Sex', data=df)"
"sns.countplot(x='Sex', data=df)"
]
},
{
@ -683,16 +683,6 @@
"df.groupby('Pclass').size()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# Distribution\n",
"sns.countplot('Pclass', data=df)"
]
},
{
"cell_type": "markdown",
"metadata": {},
@ -725,7 +715,7 @@
"metadata": {},
"outputs": [],
"source": [
"sns.factorplot('Pclass',data=df,hue='Sex',kind='count')"
"sns.catplot(x='Pclass',data=df,hue='Sex',kind='count')"
]
},
{
@ -906,7 +896,7 @@
"outputs": [],
"source": [
"# Distribution\n",
"sns.countplot('Embarked', data=df)"
"sns.countplot(x='Embarked', data=df)"
]
},
{
@ -997,7 +987,7 @@
"outputs": [],
"source": [
"# Distribution\n",
"sns.countplot('SibSp', data=df)"
"sns.countplot(x='SibSp', data=df)"
]
},
{
@ -1180,7 +1170,7 @@
"outputs": [],
"source": [
"# Distribution\n",
"sns.countplot('Parch', data=df)"
"sns.countplot(x='Parch', data=df)"
]
},
{
@ -1233,7 +1223,7 @@
"metadata": {},
"outputs": [],
"source": [
"df.groupby(['Pclass', 'Sex', 'Parch'])['Parch', 'SibSp', 'Survived'].agg({'Parch': np.size, 'SibSp': np.mean, 'Survived': np.mean})"
"df.groupby(['Pclass', 'Sex', 'Parch'])[['Parch', 'SibSp', 'Survived']].agg({'Parch': np.size, 'SibSp': np.mean, 'Survived': np.mean})"
]
},
{
@ -1576,7 +1566,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
@ -1590,7 +1580,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.1"
"version": "3.8.12"
},
"latex_envs": {
"LaTeX_envs_menu_present": true,