{"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)\nimport matplotlib.pyplot as plt\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-13T14:34:10.810217Z","iopub.execute_input":"2022-07-13T14:34:10.812492Z","iopub.status.idle":"2022-07-13T14:34:10.871474Z","shell.execute_reply.started":"2022-07-13T14:34:10.812395Z","shell.execute_reply":"2022-07-13T14:34:10.870730Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data=pd.read_csv(\"../input/income-afterincome-economic-familytype/income_afterincome_economic_familytype.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:19.549468Z","iopub.execute_input":"2022-07-13T14:34:19.549854Z","iopub.status.idle":"2022-07-13T14:34:19.568566Z","shell.execute_reply.started":"2022-07-13T14:34:19.549820Z","shell.execute_reply":"2022-07-13T14:34:19.567581Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.describe()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:30.455795Z","iopub.execute_input":"2022-07-13T14:34:30.456634Z","iopub.status.idle":"2022-07-13T14:34:30.540152Z","shell.execute_reply.started":"2022-07-13T14:34:30.456592Z","shell.execute_reply":"2022-07-13T14:34:30.539524Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data[:10] ","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:31.935508Z","iopub.execute_input":"2022-07-13T14:34:31.936000Z","iopub.status.idle":"2022-07-13T14:34:31.959959Z","shell.execute_reply.started":"2022-07-13T14:34:31.935968Z","shell.execute_reply":"2022-07-13T14:34:31.959096Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"markdown","source":"|Symbol legend:| |\n|-------|------|\n|E|use with caution|\n|A|data quality: excellent|\n|B|data quality: very good|\n|C|data quality: good|\n|D|data quality: acceptable|","metadata":{}},{"cell_type":"code","source":"print(\"Shape of Dataset\")\nprint(data.shape)\nprint()\nprint(\"unique elements in Features\")\nprint()\nprint(data.nunique())\nprint()\nprint(\"duplicated Series values\")\nprint(data.duplicated().sum())\nprint()\nprint(\"About Features : \")\nprint()\nprint(data.count()/data.isna().count()*100)\nx=data.count()/data.isna().count()*100\nplt.hist(x)\nplt.ylabel(\"Features of Dataset\")\nplt.xlabel(\"Dataset Present\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:41.809055Z","iopub.execute_input":"2022-07-13T14:34:41.809586Z","iopub.status.idle":"2022-07-13T14:34:42.038153Z","shell.execute_reply.started":"2022-07-13T14:34:41.809548Z","shell.execute_reply":"2022-07-13T14:34:42.037253Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"data.to_csv('income-afterincome-economic-familytype.csv',index=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:43.252262Z","iopub.execute_input":"2022-07-13T14:34:43.253107Z","iopub.status.idle":"2022-07-13T14:34:43.260577Z","shell.execute_reply.started":"2022-07-13T14:34:43.253069Z","shell.execute_reply":"2022-07-13T14:34:43.259717Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df=pd.read_csv(\"../input/income-economic-familytype-provinces/income-afterincome-economic-familytype_provices.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:43.830462Z","iopub.execute_input":"2022-07-13T14:34:43.830820Z","iopub.status.idle":"2022-07-13T14:34:43.851312Z","shell.execute_reply.started":"2022-07-13T14:34:43.830791Z","shell.execute_reply":"2022-07-13T14:34:43.850498Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:45.276621Z","iopub.execute_input":"2022-07-13T14:34:45.276969Z","iopub.status.idle":"2022-07-13T14:34:45.303275Z","shell.execute_reply.started":"2022-07-13T14:34:45.276940Z","shell.execute_reply":"2022-07-13T14:34:45.302365Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.describe()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:46.480843Z","iopub.execute_input":"2022-07-13T14:34:46.481394Z","iopub.status.idle":"2022-07-13T14:34:46.618616Z","shell.execute_reply.started":"2022-07-13T14:34:46.481358Z","shell.execute_reply":"2022-07-13T14:34:46.617718Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(\"Shape of Dataset\")\nprint(df.shape)\nprint()\nprint(\"unique elements in Features\")\nprint()\nprint(df.nunique())\nprint()\nprint(\"duplicated Series values\")\nprint(df.duplicated().sum())\nprint()\nprint(\"About Features : \")\nprint()\nprint(df.count()/df.isna().count()*100)\nx=df.count()/df.isna().count()*100\nplt.hist(x)\nplt.ylabel(\"Features of Dataset\")\nplt.xlabel(\"Dataset Present\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:47.320848Z","iopub.execute_input":"2022-07-13T14:34:47.321246Z","iopub.status.idle":"2022-07-13T14:34:47.529775Z","shell.execute_reply.started":"2022-07-13T14:34:47.321206Z","shell.execute_reply":"2022-07-13T14:34:47.529119Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.to_csv('income-afterincome-economic-familytype_provinces.csv',index=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:34:48.464511Z","iopub.execute_input":"2022-07-13T14:34:48.464880Z","iopub.status.idle":"2022-07-13T14:34:48.470999Z","shell.execute_reply.started":"2022-07-13T14:34:48.464831Z","shell.execute_reply":"2022-07-13T14:34:48.470342Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_1999=pd.read_csv(\"../input/incomeafterincomeeconomicfamilytype19992020/income-afterincome-economic-familytype1999-2020.csv\")","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:36:16.621852Z","iopub.execute_input":"2022-07-13T14:36:16.622250Z","iopub.status.idle":"2022-07-13T14:36:16.663880Z","shell.execute_reply.started":"2022-07-13T14:36:16.622205Z","shell.execute_reply":"2022-07-13T14:36:16.663095Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_1999.head()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:36:32.706255Z","iopub.execute_input":"2022-07-13T14:36:32.706661Z","iopub.status.idle":"2022-07-13T14:36:32.729043Z","shell.execute_reply.started":"2022-07-13T14:36:32.706627Z","shell.execute_reply":"2022-07-13T14:36:32.728367Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_1999.describe()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:37:06.477736Z","iopub.execute_input":"2022-07-13T14:37:06.478128Z","iopub.status.idle":"2022-07-13T14:37:06.966926Z","shell.execute_reply.started":"2022-07-13T14:37:06.478094Z","shell.execute_reply":"2022-07-13T14:37:06.965962Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"print(\"Shape of Dataset\")\nprint(df_1999.shape)\nprint()\nprint(\"unique elements in Features\")\nprint()\nprint(df_1999.nunique())\nprint()\nprint(\"duplicated Series values\")\nprint(df_1999.duplicated().sum())\nprint()\nprint(\"About Features : \")\nprint()\nprint(df_1999.count()/df_1999.isna().count()*100)\nx=df_1999.count()/df_1999.isna().count()*100\nplt.hist(x)\nplt.ylabel(\"Features of Dataset\")\nplt.xlabel(\"Dataset Present\")\nplt.show()","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:38:13.607600Z","iopub.execute_input":"2022-07-13T14:38:13.607974Z","iopub.status.idle":"2022-07-13T14:38:13.871309Z","shell.execute_reply.started":"2022-07-13T14:38:13.607945Z","shell.execute_reply":"2022-07-13T14:38:13.870442Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df_1999.to_csv('income-afterincome-economic-familytype_1999to2020.csv',index=False)","metadata":{"execution":{"iopub.status.busy":"2022-07-13T14:52:56.110664Z","iopub.execute_input":"2022-07-13T14:52:56.111072Z","iopub.status.idle":"2022-07-13T14:52:56.120549Z","shell.execute_reply.started":"2022-07-13T14:52:56.111036Z","shell.execute_reply":"2022-07-13T14:52:56.119341Z"},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"","metadata":{},"execution_count":null,"outputs":[]}]}