diff --git a/lab_1/Lab1.ipynb b/lab_1/Lab1.ipynb index b71fff4..687ce07 100644 --- a/lab_1/Lab1.ipynb +++ b/lab_1/Lab1.ipynb @@ -11,7 +11,7 @@ }, { "cell_type": "code", - "execution_count": 1, + "execution_count": 3, "metadata": {}, "outputs": [ { @@ -28,7 +28,7 @@ "source": [ "import matplotlib.pyplot as plt\n", "import pandas as pd\n", - "df = pd.read_csv(\".//static//csv//neo.csv\", nrows=15000)\n", + "df = pd.read_csv(\"..//static//csv//neo.csv\", nrows=15000)\n", "print(df.columns)\n" ] }, @@ -68,7 +68,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 4, "metadata": {}, "outputs": [ { @@ -77,7 +77,7 @@ "" ] }, - "execution_count": 22, + "execution_count": 4, "metadata": {}, "output_type": "execute_result" }, @@ -108,16 +108,16 @@ }, { "cell_type": "code", - "execution_count": 69, + "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/plain": [ - "" + "" ] }, - "execution_count": 69, + "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, @@ -138,12 +138,7 @@ "handles = [plt.Rectangle((0,0),1,1, color='blue'), plt.Rectangle((0,0),1,1, color='red')]\n", "labels = ['Потенциально не опасный', 'Потенциально опасный']\n", "data2.plot(kind='bar', figsize=(10, 6), color=['blue', 'red'], xlabel='Значение столбца \"hazardous\"')\n", - "plt.legend(handles, labels)\n", - "\n", - "\n", - "#ПОЧЕМУ НЕ ОТОБРАЖАЕТСЯ ОБЕ ПОЛОСКИ В КОДЕ НИЖЕ без handles?\n", - "# plot = df.groupby('hazardous')['relative_velocity'].mean().plot.bar(color=[\"pink\", \"green\"])\n", - "# plot.legend([\"Потенциально не опасный\", \"Потенциально опасный\"])" + "plt.legend(handles, labels)" ] }, {