-
Notifications
You must be signed in to change notification settings - Fork 0
/
Unconfirmed 356135.crdownload
1 lines (1 loc) · 4.51 KB
/
Unconfirmed 356135.crdownload
1
{"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":"86586494-a757-4df7-a33d-e05a2a5c0c85","_cell_guid":"deb7e6e6-7bee-442c-bc53-7ba3aa1d3f0e","collapsed":false,"jupyter":{"outputs_hidden":false},"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\nsns.set(style=\"white\", color_codes=True)\ndf=pd.read_csv('../input/uk-petrol-prices/UK Petrol Prices.csv')\ndf.head()","metadata":{"_uuid":"f5b9c04f-5e7a-4f83-bbed-389f80a36ddf","_cell_guid":"4b55a40d-53e3-4b3c-a539-7d3f0536b428","collapsed":false,"execution":{"iopub.status.busy":"2022-11-08T19:48:13.983320Z","iopub.execute_input":"2022-11-08T19:48:13.983643Z","iopub.status.idle":"2022-11-08T19:48:14.010269Z","shell.execute_reply.started":"2022-11-08T19:48:13.983620Z","shell.execute_reply":"2022-11-08T19:48:14.008965Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.plot(kind=\"scatter\", x=\"Diesel (USD)\", y=\"Petrol (USD)\")","metadata":{"_uuid":"0a4421cf-6a73-4f5d-a34a-5e8429c80b87","_cell_guid":"852e1c1c-a90f-47de-b2fb-cae37b551f9f","collapsed":false,"execution":{"iopub.status.busy":"2022-11-08T19:27:52.770782Z","iopub.execute_input":"2022-11-08T19:27:52.772360Z","iopub.status.idle":"2022-11-08T19:27:53.039631Z","shell.execute_reply.started":"2022-11-08T19:27:52.772249Z","shell.execute_reply":"2022-11-08T19:27:53.037961Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"sns.jointplot(x=\"Diesel (USD)\", y=\"Petrol (USD)\", data=df, height=6)","metadata":{"_uuid":"30c5466b-8c45-4add-bf92-eacafd46107d","_cell_guid":"eb90faa9-2443-4d44-a988-15b44967ad72","collapsed":false,"execution":{"iopub.status.busy":"2022-11-08T19:34:09.753647Z","iopub.execute_input":"2022-11-08T19:34:09.753955Z","iopub.status.idle":"2022-11-08T19:34:10.187787Z","shell.execute_reply.started":"2022-11-08T19:34:09.753933Z","shell.execute_reply":"2022-11-08T19:34:10.186831Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df.info()","metadata":{"_uuid":"282d3f6a-1140-436a-a747-49ba4bd8d6e2","_cell_guid":"236d4f27-07d6-4eef-b7ac-14118dd3e380","collapsed":false,"execution":{"iopub.status.busy":"2022-11-08T19:55:17.598283Z","iopub.execute_input":"2022-11-08T19:55:17.598625Z","iopub.status.idle":"2022-11-08T19:55:17.622375Z","shell.execute_reply.started":"2022-11-08T19:55:17.598588Z","shell.execute_reply":"2022-11-08T19:55:17.620788Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]},{"cell_type":"code","source":"df[[\"Diesel (USD)\", \"difference\", \"Petrol (USD)\"]].plot(figsize=(15,5))","metadata":{"_uuid":"67df2c32-a1dd-4fee-8fdd-ed381b30377f","_cell_guid":"b6b7b523-4464-4d99-be08-9813db609ae1","collapsed":false,"execution":{"iopub.status.busy":"2022-11-08T20:26:35.856736Z","iopub.execute_input":"2022-11-08T20:26:35.857096Z","iopub.status.idle":"2022-11-08T20:26:36.093431Z","shell.execute_reply.started":"2022-11-08T20:26:35.857070Z","shell.execute_reply":"2022-11-08T20:26:36.092205Z"},"jupyter":{"outputs_hidden":false},"trusted":true},"execution_count":null,"outputs":[]}]}