{"id":2558,"date":"2017-10-01T22:20:51","date_gmt":"2017-10-01T16:50:51","guid":{"rendered":"http:\/\/atuljha.com\/blog\/?p=2558"},"modified":"2017-10-01T23:38:07","modified_gmt":"2017-10-01T18:08:07","slug":"playing-with-python-pandas","status":"publish","type":"post","link":"https:\/\/atuljha.com\/blog\/2017\/10\/01\/playing-with-python-pandas\/","title":{"rendered":"Playing with Python Pandas"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-2559\" src=\"http:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355-683x1024.jpg\" alt=\"\" width=\"683\" height=\"1024\" srcset=\"https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355-683x1024.jpg 683w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355-200x300.jpg 200w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355-768x1152.jpg 768w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355-600x900.jpg 600w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355-173x260.jpg 173w, https:\/\/atuljha.com\/blog\/wp-content\/uploads\/2017\/10\/IMG_20151114_115355.jpg 1000w\" sizes=\"(max-width: 683px) 100vw, 683px\" \/><\/p>\n<p>Its been over 3 months for me since i quit my full time job. One of the area which fascinated me all this while was data analysis. \u00a0Over coffee\u00a0<a href=\"https:\/\/twitter.com\/anuragwho\">Anurag Ramdasan<\/a>, a friend and mentor few months back suggested me to check <a href=\"https:\/\/data.gov.in\/\">https:\/\/data.gov.in\/\u00a0 <\/a><\/p>\n<p>After reading through and spending time on YouTube, Python Pandas felt like the package worth learning, spending time on.<\/p>\n<p><em>So, What exactly is Pandas?<\/em><\/p>\n<p>Pandas is a Python library used extensively for data analysis, with millions of tables and rows. Python being one of the easiest language to pick and wide community support, makes an excellent choice. \u00a0You can find more details and use case of it on its official website\u00a0<a href=\"http:\/\/pandas.pydata.org\/\">http:\/\/pandas.pydata.org\/<\/a> \u00a0 Also did I tell you, it is open source. \ud83d\ude42<\/p>\n<p><em>Installing Pandas<\/em><\/p>\n<p>Installing Pandas is very easy, all you need to do is to use pip or anaconda, popular Python package managers.<\/p>\n<pre><span class=\"n\">conda<\/span> <span class=\"n\">install<\/span> <span class=\"n\">pandas<\/span><\/pre>\n<pre>pip install pandas<\/pre>\n<p>Alternatively check the install guide if you want to install binary packages for your operating system or source code from: <a href=\"http:\/\/pandas.pydata.org\/pandas-docs\/stable\/install.html\">http:\/\/pandas.pydata.org\/pandas-docs\/stable\/install.html\u00a0<\/a><\/p>\n<p><em>Our exercise<\/em><\/p>\n<p>After downloading the CSV file which has percentage literacy rate mentioned from year 1951 to 2011 on every 10 years basis.\u00a0\u00a0The idea or the task i felt how can i get a table with state wise literacy rate (%) for<em> Bihar, Gujarat and Assam (These are one of the many states in India)<\/em> in the year <em>1991, 2001, 2011<\/em>.<\/p>\n<p><em><strong>I have embedded iPython notebook below, which has\u00a0Snippet with step by step explanation of the process\u00a0and commands I used for this exercise :<\/strong><\/em><\/p>\n<div class=\"oembed-gist\"><script src=\"https:\/\/gist.github.com\/koolhead17\/8aca5ba19132041327a32640be7eaa0e.js\"><\/script><noscript>View the code on <a href=\"https:\/\/gist.github.com\/koolhead17\/8aca5ba19132041327a32640be7eaa0e\">Gist<\/a>.<\/noscript><\/div>\n<ul>\n<li>Regarding iPython Notebook, details on introduction and installation steps please follow\u00a0<a href=\"http:\/\/ipython.org\/notebook.html\">http:\/\/ipython.org\/notebook.html<\/a><\/li>\n<\/ul>\n<p><em><strong>Complete code with the CSV file and iPython notebook is on Github code repo:<\/strong> <\/em>\u00a0<a href=\"https:\/\/github.com\/koolhead17\/scripts\/tree\/001\/playin_with_pandas\">https:\/\/github.com\/koolhead17\/scripts\/tree\/001\/playin_with_pandas<\/a><\/p>\n<p>Reference:<br \/>\n1. <a href=\"https:\/\/medium.com\/the-renaissance-developer\/learning-python-from-zero-to-hero-8ceed48486d5\">Intro to Python\u00a0<\/a><br \/>\n2. <a href=\"https:\/\/www.youtube.com\/watch?v=dye7rDktJ2E\">Introduction to Pandas [Video]<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Its been over 3 months for me since i quit my full time job. One of the area which fascinated me all this while was data analysis. \u00a0Over coffee\u00a0Anurag Ramdasan, a friend and mentor few months back suggested me to check https:\/\/data.gov.in\/\u00a0 After reading through and spending time on YouTube, Python Pandas felt like the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/atuljha.com\/blog\/2017\/10\/01\/playing-with-python-pandas\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Playing with Python Pandas&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47],"tags":[328,329],"_links":{"self":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts\/2558"}],"collection":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/comments?post=2558"}],"version-history":[{"count":11,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts\/2558\/revisions"}],"predecessor-version":[{"id":2570,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/posts\/2558\/revisions\/2570"}],"wp:attachment":[{"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/media?parent=2558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/categories?post=2558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/atuljha.com\/blog\/wp-json\/wp\/v2\/tags?post=2558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}