{"metadata":{"kernelspec":{"language":"python","display_name":"Python 3","name":"python3"},"language_info":{"pygments_lexer":"ipython3","nbconvert_exporter":"python","version":"3.6.4","file_extension":".py","codemirror_mode":{"name":"ipython","version":3},"name":"python","mimetype":"text/x-python"}},"nbformat_minor":4,"nbformat":4,"cells":[{"cell_type":"code","source":"# This Python 3 environment comes with many helpful analytics libraries installed\n# It is defined by the kaggle/python Docker image: https://github.com/kaggle/docker-python\n# For example, here's several helpful packages to load\n\nimport numpy as np # linear algebra\nimport pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)\n\n# Input data files are available in the read-only \"../input/\" directory\n# For example, running this (by clicking run or pressing Shift+Enter) will list all files under the input directory\n\nimport os\nfor dirname, _, filenames in os.walk('/kaggle/input'):\n    for filename in filenames:\n        print(os.path.join(dirname, filename))\n\n# You can write up to 20GB to the current directory (/kaggle/working/) that gets preserved as output when you create a version using \"Save & Run All\" \n# You can also write temporary files to /kaggle/temp/, but they won't be saved outside of the current session","metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","execution":{"iopub.status.busy":"2022-07-14T12:04:00.294228Z","iopub.execute_input":"2022-07-14T12:04:00.295062Z","iopub.status.idle":"2022-07-14T12:04:00.334917Z","shell.execute_reply.started":"2022-07-14T12:04:00.294961Z","shell.execute_reply":"2022-07-14T12:04:00.333879Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"import numpy as np\nimport pandas as pd\nimport matplotlib.pyplot as plt\nimport seaborn as sns","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:00.336662Z","iopub.execute_input":"2022-07-14T12:04:00.337234Z","iopub.status.idle":"2022-07-14T12:04:01.610919Z","shell.execute_reply.started":"2022-07-14T12:04:00.337191Z","shell.execute_reply":"2022-07-14T12:04:01.609463Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"Train = pd.read_csv('../input/house-prices-advanced-regression-techniques/train.csv')","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:01.612559Z","iopub.execute_input":"2022-07-14T12:04:01.614079Z","iopub.status.idle":"2022-07-14T12:04:01.671415Z","shell.execute_reply.started":"2022-07-14T12:04:01.614020Z","shell.execute_reply":"2022-07-14T12:04:01.670040Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.scatterplot(Train['GarageArea'],Train['SalePrice']) #comparing type int, both size 1460\nplt.show() ","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:01.677720Z","iopub.execute_input":"2022-07-14T12:04:01.679678Z","iopub.status.idle":"2022-07-14T12:04:01.982192Z","shell.execute_reply.started":"2022-07-14T12:04:01.679617Z","shell.execute_reply":"2022-07-14T12:04:01.980982Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(np.corrcoef(Train['GarageArea'], Train[\"SalePrice\"]))","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:01.983979Z","iopub.execute_input":"2022-07-14T12:04:01.985307Z","iopub.status.idle":"2022-07-14T12:04:01.997412Z","shell.execute_reply.started":"2022-07-14T12:04:01.985223Z","shell.execute_reply":"2022-07-14T12:04:01.996145Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.displot(Train['GarageArea'])","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:01.999660Z","iopub.execute_input":"2022-07-14T12:04:02.000411Z","iopub.status.idle":"2022-07-14T12:04:02.390854Z","shell.execute_reply.started":"2022-07-14T12:04:02.000364Z","shell.execute_reply":"2022-07-14T12:04:02.389358Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"garea = Train['GarageArea'].tolist()\nprint('GarageArea',garea)","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:02.392816Z","iopub.execute_input":"2022-07-14T12:04:02.393578Z","iopub.status.idle":"2022-07-14T12:04:02.401076Z","shell.execute_reply.started":"2022-07-14T12:04:02.393530Z","shell.execute_reply":"2022-07-14T12:04:02.399908Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df = pd.DataFrame({\"garea\": np.random.randint(0, high = 995, size = 996)})\nranges = [0,200,400,600,800,1000]\nby_garea = df.groupby(pd.cut(df.garea, ranges)).count()\nprint(by_garea)","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:02.403535Z","iopub.execute_input":"2022-07-14T12:04:02.404428Z","iopub.status.idle":"2022-07-14T12:04:02.437310Z","shell.execute_reply.started":"2022-07-14T12:04:02.404387Z","shell.execute_reply":"2022-07-14T12:04:02.436052Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"label = [\"0-200\", \"200-400\", \"400-600\", \"600-800\", \"800-1000\"]\nvalues = by_garea[\"garea\"]\nplt.pie(values,labels = label)\nprint(values)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:16.280493Z","iopub.execute_input":"2022-07-14T12:04:16.280898Z","iopub.status.idle":"2022-07-14T12:04:16.377570Z","shell.execute_reply.started":"2022-07-14T12:04:16.280856Z","shell.execute_reply":"2022-07-14T12:04:16.376299Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"x = np.arange(0, np.pi*4, 0.05)\ny = np.sin(x)\na = np.arange(0, np.pi*4, 0.05)\nb = np.cos(x)\nc = np.arange(0, np.pi*4, 0.05)\nd = np.sin(x) + np.cos(x)\nplt.plot(x,y,label = \"sine graph\")\nplt.plot(a,b, label = \"cosine graph\")\nplt.plot(c,d, label = \"sine + cosine graph\")\nplt.legend()\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:07:20.363019Z","iopub.execute_input":"2022-07-14T12:07:20.363448Z","iopub.status.idle":"2022-07-14T12:07:20.596783Z","shell.execute_reply.started":"2022-07-14T12:07:20.363410Z","shell.execute_reply":"2022-07-14T12:07:20.595652Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nplt.plot(x,y)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:25.401128Z","iopub.execute_input":"2022-07-14T12:04:25.401577Z","iopub.status.idle":"2022-07-14T12:04:25.594021Z","shell.execute_reply.started":"2022-07-14T12:04:25.401538Z","shell.execute_reply":"2022-07-14T12:04:25.592705Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"\nplt.plot(x,y)\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-14T12:04:28.185987Z","iopub.execute_input":"2022-07-14T12:04:28.186438Z","iopub.status.idle":"2022-07-14T12:04:28.384612Z","shell.execute_reply.started":"2022-07-14T12:04:28.186398Z","shell.execute_reply":"2022-07-14T12:04:28.383119Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}