Skip to content

Commit

Permalink
Add filter sample to dataframe notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
jwood803 committed Jan 18, 2020
1 parent bd4812f commit 9dc4f9a
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions MLNetExamples/Notebooks/Intro to DataFrame.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,27 @@
"source": [
"data.GroupBy(\"ocean_proximity\").Count()"
]
},
{
"cell_type": "code",
"execution_count": 121,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<table><thead><th><i>index</i></th><th>longitude</th><th>latitude</th><th>housing_median_age</th><th>total_rooms</th><th>total_bedrooms</th><th>population</th><th>households</th><th>median_income</th><th>median_house_value</th><th>ocean_proximity</th></thead><tbody><tr><td>0</td><td>-122.27</td><td>37.8</td><td>52</td><td>249</td><td>78</td><td>396</td><td>85</td><td>1.2434</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>1</td><td>-122.25</td><td>37.87</td><td>52</td><td>609</td><td>236</td><td>1349</td><td>250</td><td>1.1696</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>2</td><td>-122.24</td><td>37.86</td><td>52</td><td>1668</td><td>225</td><td>517</td><td>214</td><td>7.8521</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>3</td><td>-122.24</td><td>37.85</td><td>52</td><td>3726</td><td>474</td><td>1366</td><td>496</td><td>9.3959</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>4</td><td>-122.23</td><td>37.83</td><td>52</td><td>2990</td><td>379</td><td>947</td><td>361</td><td>7.8772</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>5</td><td>-122.22</td><td>37.82</td><td>39</td><td>2492</td><td>310</td><td>808</td><td>315</td><td>11.8603</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>6</td><td>-122.22</td><td>37.82</td><td>42</td><td>2991</td><td>335</td><td>1018</td><td>335</td><td>13.499</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>7</td><td>-122.23</td><td>37.82</td><td>52</td><td>3242</td><td>366</td><td>1001</td><td>352</td><td>12.2138</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>8</td><td>-122.23</td><td>37.82</td><td>52</td><td>3494</td><td>396</td><td>1192</td><td>383</td><td>12.3804</td><td>500001</td><td>NEAR BAY</td></tr><tr><td>9</td><td>-122.23</td><td>37.82</td><td>52</td><td>1611</td><td>203</td><td>556</td><td>179</td><td>8.7477</td><td>500001</td><td>NEAR BAY</td></tr></tbody></table>"
]
},
"execution_count": 121,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"var filtered = data[data[\"median_house_value\"].ElementwiseGreaterThan(500000)];\n",
"filtered"
]
}
],
"metadata": {
Expand Down

0 comments on commit 9dc4f9a

Please sign in to comment.