{"cells":[{"metadata":{"_uuid":"8f2839f25d086af736a60e9eeb907d3b93b6e0e5","_cell_guid":"b1076dfc-b9ad-4769-8c92-a6c4dae69d19","trusted":true},"cell_type":"code","source":"import pandas as pd\nimport numpy as np\nimport matplotlib.pyplot as plt\nimport seaborn as sns \nimport warnings\nwarnings.filterwarnings(\"ignore\")","execution_count":null,"outputs":[]},{"metadata":{"_cell_guid":"79c7e3d0-c299-4dcb-8224-4455121ee9b0","_uuid":"d629ff2d2480ee46fbb7e2d37f6b5fab8052498a","trusted":true,"scrolled":true},"cell_type":"code","source":"train = pd.read_csv(\"../input/train_V2.csv\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"22ca136395182a6efecfa7bbc8ce2842e940f3ad"},"cell_type":"code","source":"test = pd.read_csv(\"../input/test_V2.csv\")","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"de3cf96bebeb407cf764390b7e1d6b817ff464c4"},"cell_type":"code","source":"train.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"c6731fdb7afa73f102641581f0aa16ffca0f7a80"},"cell_type":"code","source":"test.head()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"f9281070bb3cea9aadfd7355125c1fbd7aa78fc2"},"cell_type":"code","source":"train.info()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"737d8e23146622fdb8c89811088637cbf7c4a79f"},"cell_type":"code","source":"data = train.copy()\ndata.loc[data['kills'] > data['kills'].quantile(0.99)] = '8+'\nplt.figure(figsize=(15,10))\nsns.countplot(data['kills'].astype('str').sort_values())\nplt.title(\"Kill Count\",fontsize=15)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"32ceb1141fab005602cd42590de5775775d5a4c3"},"cell_type":"code","source":"kills = train.copy()\n\nkills['killsCategories'] = pd.cut(kills['kills'], [-1, 0, 2, 5, 10, 60], labels=['0_kills','1-2_kills', '3-5_kills', '6-10_kills', '10+_kills'])\n\nplt.figure(figsize=(15,8))\nsns.boxplot(x=\"killsCategories\", y=\"winPlacePerc\", data=kills)\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"be4d2d07f54261b002353e2090a9a73d1d3903c2"},"cell_type":"code","source":"data = train.copy()\ndata = data[data['heals'] < data['heals'].quantile(0.99)]\ndata = data[data['boosts'] < data['boosts'].quantile(0.99)]\n\nf,ax1 = plt.subplots(figsize =(20,10))\nsns.pointplot(x='heals',y='winPlacePerc',data=data,color='lime',alpha=0.8)\nsns.pointplot(x='boosts',y='winPlacePerc',data=data,color='blue',alpha=0.8)\nplt.text(4,0.6,'Heals',color='lime',fontsize = 17,style = 'italic')\nplt.text(4,0.55,'Boosts',color='blue',fontsize = 17,style = 'italic')\nplt.xlabel('Number of heal/boost items',fontsize = 15,color='blue')\nplt.ylabel('Win Percentage',fontsize = 15,color='blue')\nplt.title('Heals vs Boosts',fontsize = 20,color='blue')\nplt.grid()\nplt.show()","execution_count":null,"outputs":[]},{"metadata":{"trusted":true,"_uuid":"f76a45f4948b2ae2db94f99857f1a10114654bb3"},"cell_type":"code","source":"","execution_count":null,"outputs":[]}],"metadata":{"kernelspec":{"display_name":"Python 3","language":"python","name":"python3"},"language_info":{"name":"python","version":"3.6.6","mimetype":"text/x-python","codemirror_mode":{"name":"ipython","version":3},"pygments_lexer":"ipython3","nbconvert_exporter":"python","file_extension":".py"}},"nbformat":4,"nbformat_minor":1}