From b0c11fa510c474f8ed7c9c734b8797e29db86d39 Mon Sep 17 00:00:00 2001 From: radmirkaz <69034231+radmirkaz@users.noreply.github.com> Date: Sat, 18 Feb 2023 23:29:05 -0800 Subject: [PATCH] Delete krasnodar_data.ipynb --- krasnodar_data.ipynb | 1 - 1 file changed, 1 deletion(-) delete mode 100644 krasnodar_data.ipynb diff --git a/krasnodar_data.ipynb b/krasnodar_data.ipynb deleted file mode 100644 index ebf33cc..0000000 --- a/krasnodar_data.ipynb +++ /dev/null @@ -1 +0,0 @@ -{"nbformat":4,"nbformat_minor":0,"metadata":{"colab":{"provenance":[],"mount_file_id":"11qi0Zs-HQZhJFvclA7OVLT8cqojQf2aI","authorship_tag":"ABX9TyNkG4DRTbevw8ODM0d/AIu/"},"kernelspec":{"name":"python3","display_name":"Python 3"},"language_info":{"name":"python"}},"cells":[{"cell_type":"code","source":["import pandas as pd\n","import numpy as np"],"metadata":{"id":"1wCgQ3uby0j8","executionInfo":{"status":"ok","timestamp":1676663619141,"user_tz":480,"elapsed":787,"user":{"displayName":"Радмир Зосимов","userId":"04742503366191314986"}}},"execution_count":1,"outputs":[]},{"cell_type":"code","source":["df = pd.read_excel('/content/krasnodar_hack_data.xlsx')\n","df['date'] = df['date'].apply(lambda x: x[1:-1])\n","df['date'] = pd.to_datetime(df['date'])\n","df['floor'] = df['floor'].apply(lambda x: str(x).replace('--', '-'))\n","df['liter_num'] = df['liter_num'].apply(lambda x: str(x).replace('--', '-'))\n","df['price_per_m'] = df['price_per_m'].apply(lambda x: x.replace('\\xa0', '').replace(' ', '')).astype(int)\n","df['num_beds'] = df['num_beds'].astype(int)\n","df['area'] = df['area'].apply(lambda x: str(x).replace(',', '.')).astype(float)\n","df"],"metadata":{"colab":{"base_uri":"https://localhost:8080/","height":423},"id":"zYk8ByTx8DXL","executionInfo":{"status":"ok","timestamp":1676664071326,"user_tz":480,"elapsed":424,"user":{"displayName":"Радмир Зосимов","userId":"04742503366191314986"}},"outputId":"909d53dd-a9a5-4185-dda0-49fd511f3055"},"execution_count":22,"outputs":[{"output_type":"execute_result","data":{"text/plain":[" community liter_num done_date developer floor \\\n","0 ЖК «Смородина» 1-5 1 квартал 2023 ООО «АЛЬФА» 1-4 \n","1 ЖК «Смородина» 1-5 1 квартал 2023 ООО «АЛЬФА» 5-8 \n","2 ЖК «Смородина» 1-5 1 квартал 2023 ООО «АЛЬФА» 9-12 \n","3 ЖК «Смородина» 1-5 1 квартал 2023 ООО «АЛЬФА» 13-16 \n","4 ЖК «Смородина» 1-5 1 квартал 2023 ООО «АЛЬФА» 1-4 \n","... ... ... ... ... ... \n","1284 ЖК «Role Clef» nan 2 полугодие 2021 ООО «Уютный дом» 2-12 \n","1285 ЖК «Role Clef» nan 2 полугодие 2021 ООО «Уютный дом» 2-12 \n","1286 ЖК «Role Clef» nan 2 полугодие 2021 ООО «Уютный дом» 2-12 \n","1287 ЖК «Мелодия» nan дом сдан NaN 5 \n","1288 ЖК «Мелодия» nan дом сдан NaN 11 \n","\n"," area num_beds price_per_m date \n","0 32.95 1 118000 2022-01-25 \n","1 32.95 1 119000 2022-01-25 \n","2 32.95 1 120000 2022-01-25 \n","3 32.95 1 121000 2022-01-25 \n","4 35.20 1 117000 2022-01-25 \n","... ... ... ... ... \n","1284 NaN 1 586000 2023-02-15 \n","1285 NaN 2 400000 2023-02-15 \n","1286 NaN 3 395000 2023-02-15 \n","1287 NaN 2 94000 2023-02-15 \n","1288 NaN 2 94000 2023-02-15 \n","\n","[1289 rows x 9 columns]"],"text/html":["\n","
\n","
\n","
\n","\n","\n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n"," \n","
communityliter_numdone_datedeveloperfloorareanum_bedsprice_per_mdate
0ЖК «Смородина»1-51 квартал 2023ООО «АЛЬФА»1-432.9511180002022-01-25
1ЖК «Смородина»1-51 квартал 2023ООО «АЛЬФА»5-832.9511190002022-01-25
2ЖК «Смородина»1-51 квартал 2023ООО «АЛЬФА»9-1232.9511200002022-01-25
3ЖК «Смородина»1-51 квартал 2023ООО «АЛЬФА»13-1632.9511210002022-01-25
4ЖК «Смородина»1-51 квартал 2023ООО «АЛЬФА»1-435.2011170002022-01-25
..............................
1284ЖК «Role Clef»nan2 полугодие 2021ООО «Уютный дом»2-12NaN15860002023-02-15
1285ЖК «Role Clef»nan2 полугодие 2021ООО «Уютный дом»2-12NaN24000002023-02-15
1286ЖК «Role Clef»nan2 полугодие 2021ООО «Уютный дом»2-12NaN33950002023-02-15
1287ЖК «Мелодия»nanдом сданNaN5NaN2940002023-02-15
1288ЖК «Мелодия»nanдом сданNaN11NaN2940002023-02-15
\n","

1289 rows × 9 columns

\n","
\n"," \n"," \n"," \n","\n"," \n","
\n","
\n"," "]},"metadata":{},"execution_count":22}]},{"cell_type":"code","source":["df.to_csv('krasnodar_data_final.csv', index=False)"],"metadata":{"id":"v7B0OICi8LOx","executionInfo":{"status":"ok","timestamp":1676664099279,"user_tz":480,"elapsed":119,"user":{"displayName":"Радмир Зосимов","userId":"04742503366191314986"}}},"execution_count":23,"outputs":[]},{"cell_type":"code","source":[],"metadata":{"id":"UNgPSTGM8Ypj"},"execution_count":null,"outputs":[]}]} \ No newline at end of file