Skip to content

Commit

Permalink
deploy: 6ca7cb8
Browse files Browse the repository at this point in the history
  • Loading branch information
hathawayj committed Feb 6, 2024
1 parent ce39f0e commit 51d5f59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slides/p2/d3/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse text-center" id=navigation><ul class="navbar-nav ml-auto"><li class=nav-item><a class="nav-link text-dark" href=/DS250-Cannon>Home</a></li><li class=nav-item><a class="nav-link text-dark" href=/DS250-Cannon/projects>Projects</a></li><li class=nav-item><a class="nav-link text-dark" href=/DS250-Cannon/contact>Contact</a></li><li class=nav-item><a class="nav-link text-dark" href=/DS250-Cannon/course-materials>Materials</a></li><li class="nav-item dropdown"><a class="nav-link dropdown-toggle text-dark" href=# role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>Navigate</a><div class=dropdown-menu><a class=dropdown-item href=/DS250-Cannon/slides>Slides</a>
<a class=dropdown-item href=/DS250-Cannon/course-materials/syllabus/>Syllabus</a>
<a class=dropdown-item href=/DS250-Cannon/faq>FAQ</a></div></li></ul></div></div></nav></header><section class="single section-sm pb-0"><div class=container><div class=row><div class=col-lg-3><div class=sidebar><ul class=list-styled><a class=back-btn href=/DS250-Cannon></a><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/ title=Slides class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/>Slides</a><ul><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p2/ title="Week 4-5: Project 2 - Flights" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/>Week 4-5: Project 2 - Flights</a><ul><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p2/d3/ title="Day 2B: Missing Data" class="sidelist
active"><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/d3/>Day 2B: Missing Data</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p2/d2/ title="Day 2: Transforming Data" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/d2/>Day 2: Transforming Data</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p2/d1/ title="Day 1: Intro to Flights Data" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/d1/>Day 1: Intro to Flights Data</a></li></ul></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/ title="Week 2-3: Project 1 - Names" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/>Week 2-3: Project 1 - Names</a><ul><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/d3/ title="Day 3: Making your name stand out" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/d3/>Day 3: Making your name stand out</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/d2/ title="Day 2: Seeing names with Altair" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/d2/>Day 2: Seeing names with Altair</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/d1/ title="Day 1: Exploring names with pandas" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/d1/>Day 1: Exploring names with pandas</a></li></ul></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/introduction/ title="Week 1: Introduction" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/introduction/>Week 1: Introduction</a><ul><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/introduction/day02/ title="Day 2: Project 0" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/introduction/day02/>Day 2: Project 0</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/introduction/day01/ title="Day 1: Welcome" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/introduction/day01/>Day 1: Welcome</a></li></ul></li></ul></li></ul></div></div><div class=col-lg-9><div class="p-lg-5 p-4 bg-white"><h2 class=mb-5>Day 2B: Missing Data</h2><div class=content><h2 id=welcome-to-class>Welcome to class!</h2><h4 id=announcements>Announcements</h4><p><img src=content/Slides/p2 alt="The Way"></p><br><h2 id=questions-1-and-2>Questions 1 and 2</h2><p>What issues are we still running into?</p><br><h2 id=how-to-work-with-missing-data>How to work with missing data</h2><h4 id=what-counts-as-missing-data>What counts as missing data?</h4><br><h4 id=how-to-identify-missing-data>How to identify missing data</h4><ul><li><code>df.isnull().sum()</code></li><li><code>df.describe()</code></li><li><code>df.column.value_counts(dropna=False)</code></li></ul><ul><li><code>pd.crosstab()</code></li></ul><br><h4 id=option-1-remove-missing-values>Option 1: Remove missing values</h4><p>Be careful with <code>.dropna()</code>, and make sure you know what it is doing to your data!</p><p>Let&rsquo;s use the <a href=https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html>pandas example</a>:</p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python>df <span style=color:#f92672>=</span> pd<span style=color:#f92672>.</span>DataFrame({<span style=color:#e6db74>&#34;name&#34;</span>: [<span style=color:#e6db74>&#39;Alfred&#39;</span>, <span style=color:#e6db74>&#39;Batman&#39;</span>, <span style=color:#e6db74>&#39;Catwoman&#39;</span>],
active"><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/d3/>Day 2B: Missing Data</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p2/d2/ title="Day 2: Transforming Data" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/d2/>Day 2: Transforming Data</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p2/d1/ title="Day 1: Intro to Flights Data" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p2/d1/>Day 1: Intro to Flights Data</a></li></ul></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/ title="Week 2-3: Project 1 - Names" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/>Week 2-3: Project 1 - Names</a><ul><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/d3/ title="Day 3: Making your name stand out" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/d3/>Day 3: Making your name stand out</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/d2/ title="Day 2: Seeing names with Altair" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/d2/>Day 2: Seeing names with Altair</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/p1/d1/ title="Day 1: Exploring names with pandas" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/p1/d1/>Day 1: Exploring names with pandas</a></li></ul></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/introduction/ title="Week 1: Introduction" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/introduction/>Week 1: Introduction</a><ul><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/introduction/day02/ title="Day 2: Project 0" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/introduction/day02/>Day 2: Project 0</a></li><li data-nav-id=https://byuistats.github.io/DS250-Cannon/slides/introduction/day01/ title="Day 1: Welcome" class=sidelist><a href=https://byuistats.github.io/DS250-Cannon/slides/introduction/day01/>Day 1: Welcome</a></li></ul></li></ul></li></ul></div></div><div class=col-lg-9><div class="p-lg-5 p-4 bg-white"><h2 class=mb-5>Day 2B: Missing Data</h2><div class=content><h2 id=welcome-to-class>Welcome to class!</h2><h4 id=announcements>Announcements</h4><p><img src=DS250-Cannon/content/Slides/p2 alt="The Way"></p><br><h2 id=questions-1-and-2>Questions 1 and 2</h2><p>What issues are we still running into?</p><br><h2 id=how-to-work-with-missing-data>How to work with missing data</h2><h4 id=what-counts-as-missing-data>What counts as missing data?</h4><br><h4 id=how-to-identify-missing-data>How to identify missing data</h4><ul><li><code>df.isnull().sum()</code></li><li><code>df.describe()</code></li><li><code>df.column.value_counts(dropna=False)</code></li></ul><ul><li><code>pd.crosstab()</code></li></ul><br><h4 id=option-1-remove-missing-values>Option 1: Remove missing values</h4><p>Be careful with <code>.dropna()</code>, and make sure you know what it is doing to your data!</p><p>Let&rsquo;s use the <a href=https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.dropna.html>pandas example</a>:</p><div class=highlight><pre style=color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-python data-lang=python>df <span style=color:#f92672>=</span> pd<span style=color:#f92672>.</span>DataFrame({<span style=color:#e6db74>&#34;name&#34;</span>: [<span style=color:#e6db74>&#39;Alfred&#39;</span>, <span style=color:#e6db74>&#39;Batman&#39;</span>, <span style=color:#e6db74>&#39;Catwoman&#39;</span>],
<span style=color:#e6db74>&#34;toy&#34;</span>: [np<span style=color:#f92672>.</span>nan, <span style=color:#e6db74>&#39;Batmobile&#39;</span>, <span style=color:#e6db74>&#39;Bullwhip&#39;</span>],
<span style=color:#e6db74>&#34;born&#34;</span>: [pd<span style=color:#f92672>.</span>NaT, pd<span style=color:#f92672>.</span>Timestamp(<span style=color:#e6db74>&#34;1940-04-25&#34;</span>),
pd<span style=color:#f92672>.</span>NaT]})
Expand Down

0 comments on commit 51d5f59

Please sign in to comment.