First steps with Python3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

208 lines
5.9 KiB

  1. {
  2. "cells": [
  3. {
  4. "cell_type": "markdown",
  5. "metadata": {},
  6. "source": [
  7. "# Importing data"
  8. ]
  9. },
  10. {
  11. "cell_type": "code",
  12. "execution_count": 2,
  13. "metadata": {},
  14. "outputs": [
  15. {
  16. "data": {
  17. "text/html": [
  18. "<div>\n",
  19. "<style scoped>\n",
  20. " .dataframe tbody tr th:only-of-type {\n",
  21. " vertical-align: middle;\n",
  22. " }\n",
  23. "\n",
  24. " .dataframe tbody tr th {\n",
  25. " vertical-align: top;\n",
  26. " }\n",
  27. "\n",
  28. " .dataframe thead th {\n",
  29. " text-align: right;\n",
  30. " }\n",
  31. "</style>\n",
  32. "<table border=\"1\" class=\"dataframe\">\n",
  33. " <thead>\n",
  34. " <tr style=\"text-align: right;\">\n",
  35. " <th></th>\n",
  36. " <th>sepal-length</th>\n",
  37. " <th>sepal-width</th>\n",
  38. " <th>petal-length</th>\n",
  39. " <th>petal-width</th>\n",
  40. " <th>class</th>\n",
  41. " </tr>\n",
  42. " </thead>\n",
  43. " <tbody>\n",
  44. " <tr>\n",
  45. " <th>0</th>\n",
  46. " <td>5.1</td>\n",
  47. " <td>3.5</td>\n",
  48. " <td>1.4</td>\n",
  49. " <td>0.2</td>\n",
  50. " <td>Iris-setosa</td>\n",
  51. " </tr>\n",
  52. " <tr>\n",
  53. " <th>1</th>\n",
  54. " <td>4.9</td>\n",
  55. " <td>3.0</td>\n",
  56. " <td>1.4</td>\n",
  57. " <td>0.2</td>\n",
  58. " <td>Iris-setosa</td>\n",
  59. " </tr>\n",
  60. " <tr>\n",
  61. " <th>2</th>\n",
  62. " <td>4.7</td>\n",
  63. " <td>3.2</td>\n",
  64. " <td>1.3</td>\n",
  65. " <td>0.2</td>\n",
  66. " <td>Iris-setosa</td>\n",
  67. " </tr>\n",
  68. " <tr>\n",
  69. " <th>3</th>\n",
  70. " <td>4.6</td>\n",
  71. " <td>3.1</td>\n",
  72. " <td>1.5</td>\n",
  73. " <td>0.2</td>\n",
  74. " <td>Iris-setosa</td>\n",
  75. " </tr>\n",
  76. " <tr>\n",
  77. " <th>4</th>\n",
  78. " <td>5.0</td>\n",
  79. " <td>3.6</td>\n",
  80. " <td>1.4</td>\n",
  81. " <td>0.2</td>\n",
  82. " <td>Iris-setosa</td>\n",
  83. " </tr>\n",
  84. " <tr>\n",
  85. " <th>5</th>\n",
  86. " <td>5.4</td>\n",
  87. " <td>3.9</td>\n",
  88. " <td>1.7</td>\n",
  89. " <td>0.4</td>\n",
  90. " <td>Iris-setosa</td>\n",
  91. " </tr>\n",
  92. " <tr>\n",
  93. " <th>6</th>\n",
  94. " <td>4.6</td>\n",
  95. " <td>3.4</td>\n",
  96. " <td>1.4</td>\n",
  97. " <td>0.3</td>\n",
  98. " <td>Iris-setosa</td>\n",
  99. " </tr>\n",
  100. " <tr>\n",
  101. " <th>7</th>\n",
  102. " <td>5.0</td>\n",
  103. " <td>3.4</td>\n",
  104. " <td>1.5</td>\n",
  105. " <td>0.2</td>\n",
  106. " <td>Iris-setosa</td>\n",
  107. " </tr>\n",
  108. " <tr>\n",
  109. " <th>8</th>\n",
  110. " <td>4.4</td>\n",
  111. " <td>2.9</td>\n",
  112. " <td>1.4</td>\n",
  113. " <td>0.2</td>\n",
  114. " <td>Iris-setosa</td>\n",
  115. " </tr>\n",
  116. " <tr>\n",
  117. " <th>9</th>\n",
  118. " <td>4.9</td>\n",
  119. " <td>3.1</td>\n",
  120. " <td>1.5</td>\n",
  121. " <td>0.1</td>\n",
  122. " <td>Iris-setosa</td>\n",
  123. " </tr>\n",
  124. " </tbody>\n",
  125. "</table>\n",
  126. "</div>"
  127. ],
  128. "text/plain": [
  129. " sepal-length sepal-width petal-length petal-width class\n",
  130. "0 5.1 3.5 1.4 0.2 Iris-setosa\n",
  131. "1 4.9 3.0 1.4 0.2 Iris-setosa\n",
  132. "2 4.7 3.2 1.3 0.2 Iris-setosa\n",
  133. "3 4.6 3.1 1.5 0.2 Iris-setosa\n",
  134. "4 5.0 3.6 1.4 0.2 Iris-setosa\n",
  135. "5 5.4 3.9 1.7 0.4 Iris-setosa\n",
  136. "6 4.6 3.4 1.4 0.3 Iris-setosa\n",
  137. "7 5.0 3.4 1.5 0.2 Iris-setosa\n",
  138. "8 4.4 2.9 1.4 0.2 Iris-setosa\n",
  139. "9 4.9 3.1 1.5 0.1 Iris-setosa"
  140. ]
  141. },
  142. "execution_count": 2,
  143. "metadata": {},
  144. "output_type": "execute_result"
  145. }
  146. ],
  147. "source": [
  148. "from pandas import read_csv\n",
  149. "url = \"https://raw.githubusercontent.com/jbrownlee/Datasets/master/iris.csv\"\n",
  150. "names = ['sepal-length', 'sepal-width', 'petal-length', 'petal-width', 'class']\n",
  151. "dataset = read_csv(url, names=names)\n",
  152. "dataset.head(10)"
  153. ]
  154. },
  155. {
  156. "cell_type": "markdown",
  157. "metadata": {},
  158. "source": [
  159. "**This is the part of code you have to solve and deliver as a part of your report.**\n",
  160. "\n",
  161. "# Statistical Summary\n",
  162. "For this section you can create your own functions or also you can writte down the code as chunks to compute:\n",
  163. "- Mean\n",
  164. "- Number of elements per properti\n",
  165. "- Standard deviation "
  166. ]
  167. },
  168. {
  169. "cell_type": "markdown",
  170. "metadata": {},
  171. "source": [
  172. "# Plots and data visualization\n",
  173. "Make the next plots for data exploration and visulization:\n",
  174. "- Box and Whiskers plot\n",
  175. "- histogram plot\n",
  176. "- scatter plot for sepal length and width\n",
  177. "- scatter plot for petal length and width"
  178. ]
  179. },
  180. {
  181. "cell_type": "markdown",
  182. "metadata": {},
  183. "source": []
  184. }
  185. ],
  186. "metadata": {
  187. "kernelspec": {
  188. "display_name": "Python 3",
  189. "language": "python",
  190. "name": "python3"
  191. },
  192. "language_info": {
  193. "codemirror_mode": {
  194. "name": "ipython",
  195. "version": 3
  196. },
  197. "file_extension": ".py",
  198. "mimetype": "text/x-python",
  199. "name": "python",
  200. "nbconvert_exporter": "python",
  201. "pygments_lexer": "ipython3",
  202. "version": "3.11.4"
  203. },
  204. "orig_nbformat": 4
  205. },
  206. "nbformat": 4,
  207. "nbformat_minor": 2
  208. }