|
6 | 6 | "name": "L_25 Max,Min,Mean,Median,Mode,Percentiles .ipynb",
|
7 | 7 | "provenance": [],
|
8 | 8 | "collapsed_sections": [],
|
9 |
| - "authorship_tag": "ABX9TyPezsQrcy0P3ot2tLwW6i2R", |
| 9 | + "authorship_tag": "ABX9TyP5ODo2mww5Jb+0po+Yl/b5", |
10 | 10 | "include_colab_link": true
|
11 | 11 | },
|
12 | 12 | "kernelspec": {
|
|
50 | 50 | "id": "n5JvXqC3K2Up",
|
51 | 51 | "outputId": "c8124930-4fb7-41de-c5b3-096708e4095d"
|
52 | 52 | },
|
53 |
| - "execution_count": 20, |
| 53 | + "execution_count": null, |
54 | 54 | "outputs": [
|
55 | 55 | {
|
56 | 56 | "output_type": "display_data",
|
|
174 | 174 | "id": "Ptzn8PkUKEAu",
|
175 | 175 | "outputId": "f6f65ca9-b59a-4177-ed22-ebef6e12b06c"
|
176 | 176 | },
|
177 |
| - "execution_count": 17, |
| 177 | + "execution_count": null, |
178 | 178 | "outputs": [
|
179 | 179 | {
|
180 | 180 | "output_type": "display_data",
|
|
209 | 209 | {
|
210 | 210 | "cell_type": "markdown",
|
211 | 211 | "source": [
|
212 |
| - "## Get the number of rows that have max and min values" |
| 212 | + "## Get the number of rows that have max, min or a specific value (Which)" |
213 | 213 | ],
|
214 | 214 | "metadata": {
|
215 | 215 | "id": "OH3BW7loKTDG"
|
|
221 | 221 | "df <- mtcars\n",
|
222 | 222 | "\n",
|
223 | 223 | "which.max(df$mpg)\n",
|
224 |
| - "which.min(df$mpg)" |
| 224 | + "which.min(df$mpg)\n", |
| 225 | + "which(df$qsec == 20.00)" |
225 | 226 | ],
|
226 | 227 | "metadata": {
|
227 | 228 | "colab": {
|
228 | 229 | "base_uri": "https://localhost:8080/",
|
229 |
| - "height": 52 |
| 230 | + "height": 69 |
230 | 231 | },
|
231 | 232 | "id": "3C3Qe4zdKV6g",
|
232 |
| - "outputId": "7f52d635-4df7-4412-9602-0e10dae6d738" |
| 233 | + "outputId": "29b41606-d2d7-4d93-f9ad-1ab1231c5602" |
233 | 234 | },
|
234 |
| - "execution_count": 18, |
| 235 | + "execution_count": 1, |
235 | 236 | "outputs": [
|
236 | 237 | {
|
237 | 238 | "output_type": "display_data",
|
|
260 | 261 | ]
|
261 | 262 | },
|
262 | 263 | "metadata": {}
|
| 264 | + }, |
| 265 | + { |
| 266 | + "output_type": "display_data", |
| 267 | + "data": { |
| 268 | + "text/html": [ |
| 269 | + "8" |
| 270 | + ], |
| 271 | + "text/markdown": "8", |
| 272 | + "text/latex": "8", |
| 273 | + "text/plain": [ |
| 274 | + "[1] 8" |
| 275 | + ] |
| 276 | + }, |
| 277 | + "metadata": {} |
263 | 278 | }
|
264 | 279 | ]
|
265 | 280 | },
|
|
278 | 293 | "df <- mtcars\n",
|
279 | 294 | "\n",
|
280 | 295 | "rownames(df)[which.max(df$mpg)]\n",
|
281 |
| - "rownames(df)[which.min(df$mpg)]" |
| 296 | + "rownames(df)[which.min(df$mpg)]\n", |
| 297 | + "rownames(df)[which(df$qsec == 20.00)]" |
282 | 298 | ],
|
283 | 299 | "metadata": {
|
284 | 300 | "colab": {
|
285 | 301 | "base_uri": "https://localhost:8080/",
|
286 |
| - "height": 52 |
| 302 | + "height": 69 |
287 | 303 | },
|
288 | 304 | "id": "i10-olKXKiA_",
|
289 |
| - "outputId": "6b4fb964-71ab-4c9e-b477-deec9d83a774" |
| 305 | + "outputId": "7ef9ebfa-e0b3-43aa-9ab8-fd87d6755c8e" |
290 | 306 | },
|
291 |
| - "execution_count": 19, |
| 307 | + "execution_count": 2, |
292 | 308 | "outputs": [
|
293 | 309 | {
|
294 | 310 | "output_type": "display_data",
|
|
317 | 333 | ]
|
318 | 334 | },
|
319 | 335 | "metadata": {}
|
| 336 | + }, |
| 337 | + { |
| 338 | + "output_type": "display_data", |
| 339 | + "data": { |
| 340 | + "text/html": [ |
| 341 | + "'Merc 240D'" |
| 342 | + ], |
| 343 | + "text/markdown": "'Merc 240D'", |
| 344 | + "text/latex": "'Merc 240D'", |
| 345 | + "text/plain": [ |
| 346 | + "[1] \"Merc 240D\"" |
| 347 | + ] |
| 348 | + }, |
| 349 | + "metadata": {} |
320 | 350 | }
|
321 | 351 | ]
|
322 | 352 | },
|
|
355 | 385 | "id": "Wh9aq_SPMTmk",
|
356 | 386 | "outputId": "22956d1a-55ce-4d0a-e464-b18277257984"
|
357 | 387 | },
|
358 |
| - "execution_count": 26, |
| 388 | + "execution_count": null, |
359 | 389 | "outputs": [
|
360 | 390 | {
|
361 | 391 | "output_type": "display_data",
|
|
434 | 464 | "id": "UJ5gs_LNNVKT",
|
435 | 465 | "outputId": "a93e63a7-2e7d-4949-90c5-f7abb62fc532"
|
436 | 466 | },
|
437 |
| - "execution_count": 27, |
| 467 | + "execution_count": null, |
438 | 468 | "outputs": [
|
439 | 469 | {
|
440 | 470 | "output_type": "display_data",
|
|
481 | 511 | "id": "SYZp___KNnu7",
|
482 | 512 | "outputId": "c69e8b00-ca82-4c7e-804f-c99e997ed761"
|
483 | 513 | },
|
484 |
| - "execution_count": 31, |
| 514 | + "execution_count": null, |
485 | 515 | "outputs": [
|
486 | 516 | {
|
487 | 517 | "output_type": "display_data",
|
|
0 commit comments