Skip to content

Commit

Permalink
update lecture
Browse files Browse the repository at this point in the history
  • Loading branch information
gboeing committed Feb 1, 2023
1 parent a3024c2 commit 3cbaca1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions modules/04-data-cleaning-exploration/lecture.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
"metadata": {},
"outputs": [],
"source": [
"df_covid = df"
"df_covid = df.copy()"
]
},
{
Expand Down Expand Up @@ -235,7 +235,7 @@
"metadata": {},
"outputs": [],
"source": [
"df_earnings = df"
"df_earnings = df.copy()"
]
},
{
Expand Down Expand Up @@ -298,6 +298,7 @@
"source": [
"# you have to make a decision: NAICS should be int, but it contains nulls\n",
"# you could drop nulls then convert to int, or just leave it as float\n",
"# OR in recent versions of pandas, you could cast to type pd.Int64Dtype() which allows nulls\n",
"pd.isnull(df['NAICS']).sum()"
]
},
Expand Down Expand Up @@ -400,7 +401,7 @@
"metadata": {},
"outputs": [],
"source": [
"df_business = df"
"df_business = df.copy()"
]
},
{
Expand Down Expand Up @@ -858,7 +859,7 @@
"ax = sns.barplot(x=df_earnings['Total Compensation 1000s'],\n",
" y=df_earnings['Department'],\n",
" estimator=np.mean,\n",
" ci=95,\n",
" errorbar=('ci', 95),\n",
" order=order,\n",
" alpha=0.9)\n",
"\n",
Expand Down Expand Up @@ -964,7 +965,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.9"
"version": "3.10.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 3cbaca1

Please sign in to comment.