avatarNaina Chaturvedi

Free AI web copilot to create summaries, insights and extended knowledge, download it at here

11686

Abstract

class="hljs-keyword">import</span> chartify <span class="hljs-meta">#Load example dataset from chartify</span> <span class="hljs-class"><span class="hljs-keyword">data</span> = chartify.examples.example_data()</span> <span class="hljs-class"><span class="hljs-keyword">data</span>.head()</span></pre></div><p id="3245"><b>Output</b></p><figure id="8bc3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*3mayUybhbm3rynmT484ZEQ.png"><figcaption></figcaption></figure><p id="3e3c"><b>Projects Videos —</b></p><p id="861e"><b><i>All the <a href="https://readmedium.com/data-science-and-ml-projects-series-d9b07789368b?sk=4f1aaffd6d9dcf0255b7e02139d3dc71">projects</a>, <a href="https://readmedium.com/day-1-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-dsa-and-system-965e860ec677?sk=aa49bdbc46a72f600cb51774f0aea6b6">data structures</a>, <a href="https://readmedium.com/day-1-of-15-days-of-advanced-sql-series-a3676272dd5f?sk=991e8c82a9c378675080b83254ad13a2">SQL</a>, <a href="https://readmedium.com/day-1-of-30-days-of-data-structures-and-algorithms-and-system-design-simplified-dsa-and-system-965e860ec677?sk=aa49bdbc46a72f600cb51774f0aea6b6">algorithms</a>, <a href="https://readmedium.com/complete-system-design-series-part-1-45bf9c8654bc?sk=f72cc209adf149b0f0d887fc12acad25">system design</a>, <a href="https://readmedium.com/day-1-day-60-quick-recap-of-60-days-of-data-science-and-ml-6fc021643d1?sk=4e75e043b7630a9f963562ebac94e129">Data Science and ML </a>, <a href="https://readmedium.com/day-1-of-30-days-of-data-analytics-with-projects-series-6c2f939ec865?sk=55671d964311268ae548dbdac902ebe5">Data Analytics</a>, <a href="https://readmedium.com/day-1-of-30-days-of-data-engineering-894822fcb128?sk=76ba558bfe2d9f85cbe741e505295531">Data Engineering</a>, , <a href="https://readmedium.com/data-science-and-ml-projects-series-d9b07789368b?sk=4f1aaffd6d9dcf0255b7e02139d3dc71&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Data Science and ML projects</a>, <a href="https://readmedium.com/implemented-data-engineering-projects-59a8c4190b28?sk=d08d3f406f1dddd6d8122c03ca4fef5d">Implemented Data Engineering Projects</a>, <a href="https://readmedium.com/implemented-deep-learning-projects-aa18d5551046?sk=ac0dacd3bce951bc2d63cf8fd30a6bde&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Deep Learning Projects</a>, <a href="https://readmedium.com/implemented-machine-learning-ops-projects-60b9414cd8c3?sk=6e1a5000842aafe7d39f5f5bb0df1544&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Machine Learning Ops Projects</a>, <a href="https://readmedium.com/implemented-time-series-analysis-and-forecasting-projects-3adea88b7fe8?sk=7c05f325b2a14a44c84c4832a91a7be9&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Time Series Analysis and Forecasting Projects</a>, <a href="https://readmedium.com/implemented-applied-machine-learning-projects-95294db9cd5?sk=a418f26d2b07b86cecbed625b5570ce8&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Applied Machine Learning Projects</a>, <a href="https://readmedium.com/implemented-tensorflow-and-keras-projects-adbaed77d572?sk=dab9d9584be3eb7a63125b871515e0e4&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Tensorflow and Keras Projects</a>, <a href="https://readmedium.com/implemented-pytorch-projects-f434f6faed4d?sk=baaae01f83ed39a9517d8ad58d8d9606&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented PyTorch Projects</a>, <a href="https://readmedium.com/implemented-scikit-learn-projects-c0e65f70e54e?sk=819c5487448cb84eafa75589a6a770cd&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Scikit Learn Projects</a>, <a href="https://readmedium.com/implemented-big-data-projects-9973d14131ca?sk=f41dfc9c96be347127ab78ac998e06ee">Implemented Big Data Projects</a>, <a href="https://readmedium.com/implemented-cloud-machine-learning-projects-b5a34d1d7f8?sk=6fa9d02dde908aa397dcaeb02cf754b4">Implemented Cloud Machine Learning Projects</a>, <a href="https://readmedium.com/implemented-neural-networks-projects-d25a6476d72b?sk=022a810763e8e8366974c066fa9c1c85">Implemented Neural Networks Projects</a>, <a href="https://readmedium.com/implemented-opencv-projects-7406d9b89032?sk=eea2d41edcb2da4a87830dfb7d702524">Implemented OpenCV Projects</a>,<a href="https://readmedium.com/complete-ml-research-papers-summarized-a69afd5bb9bf?sk=54dcfdc31cf7c959192ebf666ca24cdd">Complete ML Research Papers Summarized</a>, <a href="https://readmedium.com/data-analytics-projects-series-b6abc25e4815?sk=571e1a7e344560ab7aa01d7af7004824&amp;utm_campaign=Become%20a%20Tech%20Samurai&amp;utm_medium=email&amp;utm_source=Revue%20newsletter">Implemented Data Analytics projects</a></i></b>,<b><i> <a href="https://readmedium.com/implemented-data-visualization-projects-9576431db13d?sk=280a40c65eced3fd9febd11a40d68bf0">Implemented Data Visualization Projects</a>, <a href="https://readmedium.com/implemented-data-mining-projects-b448780b5869?sk=a41f09a7fe9c71566977dfd47ed76e9f">Implemented Data Mining Projects</a>, <a href="https://readmedium.com/implemented-natural-leaning-processing-projects-f5efa8c4cb31?sk=597f814c51b392abd8b2a9e28c1eebb5">Implemented Natural Leaning Processing Projects</a>, <a href="https://readmedium.com/day-1-of-30-days-of-machine-learning-ops-7c299e4b09be?sk=4ab48350a5c359fc157109e48b1d738f">MLOps </a>and <a href="https://readmedium.com/day-1-of-60-days-of-deep-learning-with-projects-series-4a5caa305cf6?sk=89f3d43dd450035546bf3a8cf85bb125">Deep Learning</a>, <a href="https://readmedium.com/60-days-of-applied-machine-learning-with-projects-series-cd975641da0a?sk=09cf1f30e912774cba6501c8bac5edde">Applied Machine Learning with Projects Series</a>, <a href="https://readmedium.com/30-days-of-pytorch-with-projects-series-737941e5aa4f?sk=d0ead140034be9f1fff27d059b525221">PyTorch with Projects Series</a>, <a href="https://readmedium.com/30-days-of-tensorflow-and-keras-with-projects-series-f52e0815d696?sk=945bb73c32bc967b7e056f894fab7626">Tensorflow and Keras with Projects Series</a>, <a href="https://readmedium.com/day-1-of-30-days-of-scikit-learn-series-with-projects-76341935e5fd?sk=44a6845c53109c2482c368bdb7924e46">Scikit Learn Series with Projects</a>, <a href="https://readmedium.com/day-1-of-15-days-of-time-series-analysis-and-forecasting-with-projects-series-5ba3b6cf7528?sk=7a5826927d95b8fd22deae9ee53bc54d">Time Series Analysis and Forecasting with Projects Series</a>, <a href="https://readmedium.com/day-1-of-ml-system-design-case-studies-series-ml-system-design-basics-dbf7765b3c0c?sk=9ce5aee0a8b5208be05ac5284872e91b">ML System Design Case Studies Series</a> videos will be published on our youtube channel ( just launched).</i></b></p><p id="4b19"><b><i>Subscribe today!</i></b></p><div id="1520" class="link-block"> <a href="https://www.youtube.com/@ignito5917/about"> <div> <div> <h2>Ignito</h2> <div><h3>Excited to share that we have launched our Youtube channel — Ignito to cover all the projects and coding exercise for …</h3></div> <div><p>www.youtube.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*N9OmxhpEw0AuQEey)"></div> </div> </div> </a> </div><p id="6a0f"><b>Code</b></p><div id="61cc"><pre>bar_data = (<span class="hljs-name">data</span>.groupby('country')[['quantity']].sum() .reset_index() ) bar_data</pre></div><p id="0614"><b>Output</b></p><figure id="b3a6"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*lHNrfTdf89He6fy1finb8g.png"><figcaption></figcaption></figure><p id="3ac8"><b>Code</b></p><div id="aae4"><pre>grouped_bar_data = (data<span class="hljs-selector-class">.groupby</span>(<span class="hljs-selector-attr">[<span class="hljs-string">'country'</span>, <span class="hljs-string">'fruit'</span>]</span>)<span class="hljs-selector-attr">[[<span class="hljs-string">'quantity'</span>]</span>]<span class="hljs-selector-class">.sum</span>()<span class="hljs-selector-class">.reset_index</span>() ) grouped_bar_data ch = chartify<span class="hljs-selector-class">.Chart</span>(x_axis_type=<span class="hljs-string">'categorical'</span>, blank_labels=True) ch<span class="hljs-selector-class">.style</span><span class="hljs-selector-class">.set_color_palette</span>(<span class="hljs-string">'categorical'</span>, <span class="hljs-string">'Dark2'</span>) ch<span class="hljs-selector-class">.plot</span><span class="hljs-selector-class">.bar</span>(data_frame=grouped_bar_data, categorical_columns=<span class="hljs-selector-attr">[<span class="hljs-string">'fruit'</span>, <span class="hljs-string">'country'</span>]</span>, numeric_column=<span class="hljs-string">'quantity'</span>, color_column=<span class="hljs-string">'fruit'</span>) ch<span class="hljs-selector-class">.show</span>()</pre></div><p id="0ac8"><b>Output</b></p><figure id="6cf9"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*Nx4GHjtAv5DKB2jSK-cv2Q.png"><figcaption></figcaption></figure><p id="213a"><b>Code</b></p><div id="a2c1"><pre>layout_options = [<span class="hljs-string">'slide_100%'</span>, <span class="hljs-string">'slide_75%'</span>, <span class="hljs-string">'slide_50%'</span>, <span class="hljs-string">'slide_25%'</span>] <span class="hljs-keyword">for</span> option <span class="hljs-keyword">in</span> layout_options: ch = chartify.Chart(<span class="hljs-attribute">layout</span>=option, <span class="hljs-attribute">blank_labels</span>=<span class="hljs-literal">True</span>, <span class="hljs-attribute">x_axis_type</span>=<span class="hljs-string">'categorical'</span>) ch.set_title(<span class="hljs-string">'Layout: {}'</span>.format(option)) ch.plot.bar(<span class="hljs-attribute">data_frame</span>=grouped_bar_data, categorical_columns=[<span class="hljs-string">'fruit'</span>, <span class="hljs-string">'country'</span>], <span class="hljs-attribute">numeric_column</span>=<span class="hljs-string">'quantity'</span>, <span class="hljs-attribute">color_column</span>=<span class="hljs-string">'fruit'</span>)</pre></div><div id="d2cc"><pre>ch.<span class="hljs-keyword">show</span>()</pre></div><p id="fc1c"><b>Output</b></p><figure id="d2e1"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*QjUirg-SR7EonS77VDMVjA.png"><figcaption></figcaption></figure><figure id="8983"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*eKhjoeSX4pN4hThY8nxbyw.png"><figcaption></figcaption></figure><figure id="fb5a"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*8xYtgqMjiXIGv8N12nkh5Q.png"><figcaption></figcaption></figure><figure id="70e4"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4odStC01OMyT2OHWaGyPMA.png"><figcaption></figcaption></figure><p id="6fe1"><b>Code</b></p><div id="8913"><pre>ch<span class="hljs-selector-class">.figure</span><span class="hljs-selector-class">.xaxis</span><span class="hljs-selector-class">.axis_label_text_color</span>

Options

= <span class="hljs-string">'red'</span> ch<span class="hljs-selector-class">.figure</span><span class="hljs-selector-class">.height</span> = <span class="hljs-number">500</span> ch<span class="hljs-selector-class">.axes</span><span class="hljs-selector-class">.set_xaxis_label</span>(<span class="hljs-string">'X-axis label'</span>) ch<span class="hljs-selector-class">.show</span>()</pre></div><p id="b06b"><b>Output</b></p><figure id="b0da"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*ErpTIIrQXj1IzmUx9-K32w.png"><figcaption></figcaption></figure><p id="fda6"><b>Implementation Screenshot</b></p><figure id="c283"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*TPlun6u5TGL02XhWsFtfuA.png"><figcaption>Chartify Example implementation</figcaption></figure><figure id="2be3"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*HmnnXqfc02zSZ62DghlWXw.png"><figcaption>Chartify Example implementation</figcaption></figure><h1 id="0619">4. Faker</h1><p id="ea76">Faker is a Python library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, or anonymize data taken from a production service, Faker is just perfect for you.</p><p id="b18f"><b>Installation</b></p><div id="b703"><pre>pip <span class="hljs-keyword">install</span> Faker</pre></div><p id="820f"><b>Code</b></p><div id="4c1d"><pre><span class="hljs-comment">#Import faker library</span> <span class="hljs-keyword">from</span> faker <span class="hljs-keyword">import</span> Faker</pre></div><div id="9f26"><pre><span class="hljs-comment"># Generating fake email</span> fake = Faker() <span class="hljs-built_in">print</span> (fake.email()) <span class="hljs-built_in">print</span>(fake.country()) <span class="hljs-comment"># Generating fake name</span> <span class="hljs-built_in">print</span>(fake.name()) <span class="hljs-comment"># Generating fake text</span> <span class="hljs-built_in">print</span>(fake.text()) <span class="hljs-comment"># Generating fake url</span> <span class="hljs-built_in">print</span>(fake.url()) <span class="hljs-comment"># Generating fake profile</span> <span class="hljs-built_in">print</span>(fake.profile()) <span class="hljs-comment"># Generating random number</span> <span class="hljs-built_in">print</span>(fake.random_number())</pre></div><p id="441d"><b>Output</b></p><div id="ec81"><pre>[email protected] Saint Vincent and the Grenadines Gilbert Carr Voluptates eos minus illo ad. Ad consequatur maxime doloribus tempora. Hic quae minus placeat rerum perspiciatis. Iusto at reprehenderit animi id aperiam. http:<span class="hljs-comment">//www.shah.com/</span> {'job': 'Musician', 'company': 'Smith-Vang', 'ssn': '472-36-<span class="hljs-number">5899</span>', 'residence': '<span class="hljs-number">0252</span> Sierra Island Suite 754\nSharonfort, OR <span class="hljs-number">9411</span>9-<span class="hljs-number">4839</span>', 'current_location': (Decimal('86.<span class="hljs-number">231100</span>5'), Decimal('136.<span class="hljs-number">358187</span>')), 'blood_group': 'A+', 'website': ['http://cox.com/', 'https://www.alexander.org/', 'https://www.savage-bradley.com/'], 'username': 'holly15', 'name': 'Dustin Cook', 'sex': 'M', 'address': '485 Cynthia Wall\nWhiteton, MO <span class="hljs-number">7556</span>1', 'mail': '[email protected]', 'birthdate': '<span class="hljs-number">1999-05-08</span>'} <span class="hljs-number">58</span></pre></div><p id="e2f7"><b>Code</b></p><div id="cd6e"><pre>for _ in <span class="hljs-built_in">range</span>(<span class="hljs-number">10</span>): <span class="hljs-built_in">print</span>(fake.<span class="hljs-built_in">name</span>())</pre></div><p id="64a4"><b>Output</b></p><div id="c606"><pre>Regina Deleon Teresa Robertson Rodney Hodges Chad Smith Peter Gomez <span class="hljs-keyword">John </span>Carter Kevin <span class="hljs-keyword">Blanchard </span>Michael Esparza Steven <span class="hljs-keyword">Bennett </span>Robin Campbell</pre></div><p id="b91c"><b>Implementation Screenshot</b></p><figure id="a415"><img src="https://cdn-images-1.readmedium.com/v2/resize:fit:800/1*4WluMDpAkt8gQKN3UsJdeA.png"><figcaption>Faker example Implementation</figcaption></figure><p id="9b20"><b>References</b></p><div id="e3b9" class="link-block"> <a href="https://pypi.org/"> <div> <div> <h2>PyPI · The Python Package Index</h2> <div><h3>The Python Package Index (PyPI) is a repository of software for the Python programming language. PyPI helps you find…</h3></div> <div><p>pypi.org</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*bIoO61CHGKRdAvUt)"></div> </div> </div> </a> </div><h1 id="04b5">Thanks for Reading. Keep Learning :)</h1><h1 id="e3f1">Want to read programmers humor?</h1><div id="fd28" class="link-block"> <a href="https://readmedium.com/programming-humor-part-2-f92cf5a26f2b"> <div> <div> <h2>Programming Humor Part 2</h2> <div><h3>Keep laughing because it’s hilarious ….</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*xkCXqHz7vIXjmjD_.png)"></div> </div> </div> </a> </div><div id="1e2f" class="link-block"> <a href="https://readmedium.com/the-most-hilarious-code-comments-ever-bae3cb1030b5"> <div> <div> <h2>The Most Hilarious Code Comments Ever</h2> <div><h3>Programmer Humor: Yes, coders actually wrote them!</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*C-cPP9D2MIyeexAT.gif)"></div> </div> </div> </a> </div><div id="93a8" class="link-block"> <a href="https://readmedium.com/coding-sins-hilarious-developer-confessions-f55eb342454e"> <div> <div> <h2>Coding Sins: Hilarious Developer Confessions</h2> <div><h3>How ‘whiteboarding’ got mocked</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*JceCvoRHEHRXyHnb.jpeg)"></div> </div> </div> </a> </div><div id="052b" class="link-block"> <a href="https://readmedium.com/10-witty-programming-jokes-that-will-make-you-go-rofl-a53fbfb91943"> <div> <div> <h2>10 Witty Programming Jokes That Will Make You Go ROFL</h2> <div><h3>These are hilarious ….</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*c6MUlOF-1Z2Su0-E)"></div> </div> </div> </a> </div><h1 id="d281">Recommended Articles -</h1><div id="f7a3" class="link-block"> <a href="https://readmedium.com/python-iterators-generators-and-decorators-made-easy-659cae26054f"> <div> <div> <h2>Python Iterators, Generators And Decorators Made Easy</h2> <div><h3>A Quick Implementation Guide</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*XtVnWXUTVVE13f3-.jpeg)"></div> </div> </div> </a> </div><div id="70ed" class="link-block"> <a href="https://readmedium.com/23-data-science-techniques-you-should-know-61bc2c9d1b3a"> <div> <div> <h2>23 Data Science Techniques You Should Know!</h2> <div><h3>Save your precious time by using these hacks</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/1*222j6BFuGGqZxksgOHa4kg.png)"></div> </div> </div> </a> </div><div id="b8f3" class="link-block"> <a href="https://readmedium.com/coding-sins-hilarious-developer-confessions-f55eb342454e"> <div> <div> <h2>Coding Sins: Hilarious Developer Confessions</h2> <div><h3>How ‘whiteboarding’ got mocked</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*JceCvoRHEHRXyHnb.jpeg)"></div> </div> </div> </a> </div><div id="c55e" class="link-block"> <a href="https://readmedium.com/5-cool-advanced-pandas-techniques-for-data-scientists-c5a59ae0625d"> <div> <div> <h2>5 Cool Advanced Pandas Techniques for Data Scientists</h2> <div><h3>Use these techniques …</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*nd1WG4uRgLzMQr8P.jpeg)"></div> </div> </div> </a> </div><div id="bbb9" class="link-block"> <a href="https://readmedium.com/stack-overflow-analyzed-data-from-60-000-software-developers-hours-they-work-languages-they-476ac6ca0197"> <div> <div> <h2>Stack Overflow Analyzed Data from 60,000+ Software Developers — Hours They Work, Languages They…</h2> <div><h3>Here is what they found…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*LWGz2247yyjKfW6g.png)"></div> </div> </div> </a> </div><div id="4965" class="link-block"> <a href="https://readmedium.com/advanced-python-made-easy-part-4-a4996ba9fe19"> <div> <div> <h2>Advanced Python Made Easy — Part 4</h2> <div><h3>Use these hacks and techniques…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*nd1WG4uRgLzMQr8P.jpeg)"></div> </div> </div> </a> </div><div id="1938" class="link-block"> <a href="https://readmedium.com/advanced-python-made-easy-part-1-ce1e2f17431e"> <div> <div> <h2>Advanced Python Made Easy — Part 1</h2> <div><h3>Use these hacks and techniques…</h3></div> <div><p>medium.com</p></div> </div> <div> <div style="background-image: url(https://miro.readmedium.com/v2/resize:fit:320/0*nd1WG4uRgLzMQr8P.jpeg)"></div> </div> </div> </a> </div></article></body>

Four “Lesser Known” Python Libraries for Data Science

These libraries are so cool

Gif (Source and Credits: Analytics India Magazine)

1. Numerizer

A Python library to convert natural language strings into ints and floats. It’s a very useful library for NLP projects.

Installation

pip install numerizer

Importing numerize library

from numerizer import numerize

Code

print (numerize("one two three"))
print (numerize('twelve hundred'))
print (numerize('twenty one thousand four hundred and seventy three'))
print (numerize('one million two hundred and fifty thousand and seven'))

Output

1 2 3
1200
21473
1250007

Implementation Screenshot

Numerizer example implementation

Some of the other best Series —

30 days of Machine Learning Ops

30 Days of Natural Language Processing ( NLP) Series

30 days of Data Engineering with projects Series

Data Science and Machine Learning Research ( papers) Simplified **

60 days of Data Science and ML Series with projects

100 days : Your Data Science and Machine Learning Degree Series with projects

23 Data Science Techniques You Should Know

Tech Interview Series — Curated List of coding questions

Complete System Design with most popular Questions Series

Complete Data Visualization and Pre-processing Series with projects

Complete Python Series with Projects

Complete Advanced Python Series with Projects

Kaggle Best Notebooks that will teach you the most

Complete Developers Guide to Git

Exceptional Github Repos — Part 1

Exceptional Github Repos — Part 2

All the Data Science and Machine Learning Resources

210 Machine Learning Projects

Tech Newsletter —

If you are interested, you can join my newsletter through which I send tech interview tips, techniques, patterns, hacks — Software Development, ML, Data Science, Startups and Technology projects to more than 30K readers. You can subscribe to Tech Brew :

Github —

2. EMOT

Emot is a python library to extract the emojis and emoticons from a text(string).

Installation

pip install emot

Code

import re
from emot.emo_unicode import UNICODE_EMO, EMOTICONS
# Function for converting emojis into word
def convert_emojis_towords(text):
    for emot in UNICODE_EMO:
        text = text.replace(emot, "_".join(UNICODE_EMO[emot].replace(",","").replace(":","").split()))
    return text
t1 = "The feeling of success 😎, The feeling of achievement 😍"
convert_emojis_towords(t1)

Output

'The feeling of success smiling_face_with_sunglasses, The feeling of achievement smiling_face_with_heart-eyes'

Implementation Screenshot

EMOT example implementation

3. Chartify

Chartify is a Python visualization library built on top of Bokeh that aims to make it as easy as possible for data scientists to create charts. With this data scientists spend less time transforming data to get charts to work. All plotting functions use a consistent tidy input data format. You can Create pretty charts with very little customization required.

Installation

pip install chartify

Code

#Import necessary library
import numpy as np
import pandas as pd
import chartify
#Load example dataset from chartify
data = chartify.examples.example_data()
data.head()

Output

Projects Videos —

All the projects, data structures, SQL, algorithms, system design, Data Science and ML , Data Analytics, Data Engineering, , Implemented Data Science and ML projects, Implemented Data Engineering Projects, Implemented Deep Learning Projects, Implemented Machine Learning Ops Projects, Implemented Time Series Analysis and Forecasting Projects, Implemented Applied Machine Learning Projects, Implemented Tensorflow and Keras Projects, Implemented PyTorch Projects, Implemented Scikit Learn Projects, Implemented Big Data Projects, Implemented Cloud Machine Learning Projects, Implemented Neural Networks Projects, Implemented OpenCV Projects,Complete ML Research Papers Summarized, Implemented Data Analytics projects, Implemented Data Visualization Projects, Implemented Data Mining Projects, Implemented Natural Leaning Processing Projects, MLOps and Deep Learning, Applied Machine Learning with Projects Series, PyTorch with Projects Series, Tensorflow and Keras with Projects Series, Scikit Learn Series with Projects, Time Series Analysis and Forecasting with Projects Series, ML System Design Case Studies Series videos will be published on our youtube channel ( just launched).

Subscribe today!

Code

bar_data = (data.groupby('country')[['quantity']].sum()
            .reset_index()
           )
bar_data

Output

Code

grouped_bar_data = (data.groupby(['country', 'fruit'])[['quantity']].sum().reset_index()
           )
grouped_bar_data
ch = chartify.Chart(x_axis_type='categorical',
                    blank_labels=True)
ch.style.set_color_palette('categorical', 'Dark2')
ch.plot.bar(data_frame=grouped_bar_data,
            categorical_columns=['fruit', 'country'],
            numeric_column='quantity',
            color_column='fruit')
ch.show()

Output

Code

layout_options = ['slide_100%', 'slide_75%', 'slide_50%', 'slide_25%']
for option in layout_options:
    ch = chartify.Chart(layout=option, blank_labels=True, x_axis_type='categorical')
    ch.set_title('Layout: {}'.format(option))
    ch.plot.bar(data_frame=grouped_bar_data,
            categorical_columns=['fruit', 'country'],
            numeric_column='quantity',
            color_column='fruit')
ch.show()

Output

Code

ch.figure.xaxis.axis_label_text_color = 'red'
ch.figure.height = 500
ch.axes.set_xaxis_label('X-axis label')
ch.show()

Output

Implementation Screenshot

Chartify Example implementation
Chartify Example implementation

4. Faker

Faker is a Python library that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, or anonymize data taken from a production service, Faker is just perfect for you.

Installation

pip install Faker

Code

#Import faker library
from faker import Faker
# Generating fake email
fake = Faker()
print (fake.email()) 
print(fake.country()) 
# Generating fake name
print(fake.name()) 
# Generating fake text
print(fake.text()) 
# Generating fake url
print(fake.url()) 
# Generating fake profile
print(fake.profile())
# Generating random number
print(fake.random_number())

Output

[email protected]
Saint Vincent and the Grenadines
Gilbert Carr
Voluptates eos minus illo ad. Ad consequatur maxime doloribus tempora. Hic quae minus placeat rerum perspiciatis. Iusto at reprehenderit animi id aperiam.
http://www.shah.com/
{'job': 'Musician', 'company': 'Smith-Vang', 'ssn': '472-36-5899', 'residence': '0252 Sierra Island Suite 754\nSharonfort, OR 94119-4839', 'current_location': (Decimal('86.2311005'), Decimal('136.358187')), 'blood_group': 'A+', 'website': ['http://cox.com/', 'https://www.alexander.org/', 'https://www.savage-bradley.com/'], 'username': 'holly15', 'name': 'Dustin Cook', 'sex': 'M', 'address': '485 Cynthia Wall\nWhiteton, MO 75561', 'mail': '[email protected]', 'birthdate': '1999-05-08'}
58

Code

for _ in range(10):
    print(fake.name())

Output

Regina Deleon
Teresa Robertson
Rodney Hodges
Chad Smith
Peter Gomez
John Carter
Kevin Blanchard
Michael Esparza
Steven Bennett
Robin Campbell

Implementation Screenshot

Faker example Implementation

References

Thanks for Reading. Keep Learning :)

Want to read programmers humor?

Recommended Articles -

Python
Programming
Data Science
Tech
Machine Learning
Recommended from ReadMedium