<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rahul Hande on Medium]]></title>
        <description><![CDATA[Stories by Rahul Hande on Medium]]></description>
        <link>https://medium.com/@rahulhande2780?source=rss-61b2279e9af7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*gitKpOtXBfnYZJ6QZ-9VqQ.jpeg</url>
            <title>Stories by Rahul Hande on Medium</title>
            <link>https://medium.com/@rahulhande2780?source=rss-61b2279e9af7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 01:12:02 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rahulhande2780/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploratory Data Analysis of Swiggy.]]></title>
            <link>https://medium.com/@rahulhande2780/exploratory-data-analysis-of-swiggy-1bd6941ccf08?source=rss-61b2279e9af7------2</link>
            <guid isPermaLink="false">https://medium.com/p/1bd6941ccf08</guid>
            <dc:creator><![CDATA[Rahul Hande]]></dc:creator>
            <pubDate>Sun, 29 Jan 2023 03:45:30 GMT</pubDate>
            <atom:updated>2023-01-29T03:45:30.263Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QHAd13kRYtlNrjpBhP0vYg.jpeg" /></figure><h3>What is Exploratory Data Analysis?</h3><p>Exploratory Data Analysis (EDA) is an approach to analyzing and summarizing datasets, with the goal of discovering patterns, anomalies, and other insights that can inform further analysis and modeling efforts.</p><p>EDA typically involves visualizing data using plots and graphs, as well as statistical summaries and tests to uncover patterns and relationships in the data.</p><p>The goal of EDA is not to confirm preconceived notions or hypotheses, but rather to explore the data and let it lead the analysis in new and potentially unexpected directions.</p><p>EDA is an important first step in any data analysis project, as it helps to get a sense of the structure and characteristics of the data, identify any problems or issues that need to be addressed, and inform the direction of further analysis.</p><h4>About Kaggle</h4><p><a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.kaggle.com%2F">Kaggle</a> is an online community where data scientists and machine learning experts may connect. Users of Kaggle may discover and share data sets, study and develop models in a web-based data science environment, collaborate with other data scientists and machine learning experts, and participate in contests to address data science topics.</p><h4>Who is Swiggy?</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*zrqwB9YFbgr4O5osooqzyQ.jpeg" /></figure><p><a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.swiggy.com%2F">Swiggy</a> is an Indian online food ordering and delivery platform. Founded in July 2014, Swiggy is based in Bangalore and operates in 500 Indian+ cities. Besides food delivery, Swiggy also provides on-demand grocery deliveries under the name Instamart, and a same-day package delivery service called Swiggy Genie.</p><p>In 2013, SriharshaMajety and Nandan Reddy embarked on the entrepreneurial journey and established Bundl Technologies, a logistics service. Bundl was shut down a year after its inception, which, regrettably, did not prove to be a success. They came back with a company proposal after giving it some serious thought, but this time it was in the food sector. Rahul Jaimini created an online meal ordering and delivery app as a result. From software and databases to the user interface and functionality, he was in charge of everything.</p><p>The company had to prepare for some competition when the app went live in a small area because of Foodpanda and Ola Cafe. When Swiggy first began operations only six delivery boys and more than 20 eateries were on board. It was only reasonable at this time to be unable to tell a good restaurant from a bad one. As a result, the crew only chose respectable eateries that did not offer internal delivery.</p><p>They then collaborated with a few eateries, and for the ones who baulked, the founders took the food deliveries home, snapped photos of them, and put them on Swiggy. With this Swiggy started its journey in online food delivery.</p><h3>Roadmap of the EDA Project.</h3><p>Here are the basic steps of any EDA project.</p><ul><li>Select the real-world data set from Kaggle.</li><li>Download and read the file using Pandas.</li><li>Select the required columns from the dataset.</li><li>Perform data preparation and cleaning using Pandas and NumPy.</li><li>Plot interactive graphs using Matplotlib, Seaborn, Plotly, and WordCloud.</li><li>Ask and answer interesting questions from the dataset.</li><li>Summarize your work and provide a conclusion.</li><li>Ideas for future work.</li></ul><h3>About the Swiggy dataset.</h3><p>The data has been scraped from the official Swiggy Website and is available under the Creative Commons License. This dataset contains 11 different features of each restaurant listed on the website of Swiggy which you can find below.</p><ul><li>id — Every restaurant is having a unique ID</li><li>name — Name of the Restaurant</li><li>city — The city where the restaurant is located</li><li>rating — Rating of the Restaurant</li><li>rating_count — Number of People given the Rating</li><li>cost — Cost of eating in that restaurant</li><li>cuisine — Cuisines that the restaurant serves</li><li>lic_no — License number of that restaurant</li><li>link — Restaurant link on Swiggy website</li><li>address — Full address of the restaurant</li><li>menu — It contains the menu items of a restaurant in JSON format.</li></ul><h3>How to Run the Code</h3><p>The best way to learn the material is to execute the code and experiment with it yourself. This tutorial is an executable <a href="https://jovian.com/outlink?url=https%3A%2F%2Fjupyter.org">Jupyter notebook</a>. You can <em>run</em> this tutorial and experiment with the code examples in a couple of ways: <em>using free online resources</em> (recommended) or <em>on your computer</em>.</p><p>Option 1: Running using free online resources (1-click, recommended)</p><p>The easiest way to start executing the code is to click the <strong>Run</strong> button at the top of this page and select <strong>Run on Binder</strong>. You can also select “Run on Colab” or “Run on Kaggle”, but you’ll need to create an account on <a href="https://jovian.com/outlink?url=https%3A%2F%2Fcolab.research.google.com">Google Colab</a> or <a href="https://jovian.com/outlink?url=https%3A%2F%2Fkaggle.com">Kaggle</a> to use these platforms.</p><p>Option 2: Running on your computer locally</p><p>To run the code on your computer locally, you’ll need to set up <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.python.org">Python</a>, download the notebook and install the required libraries. We recommend using the <a href="https://jovian.com/outlink?url=https%3A%2F%2Fdocs.conda.io%2Fprojects%2Fconda%2Fen%2Flatest%2Fuser-guide%2Finstall%2F">Conda</a> distribution of Python. Click the <strong>Run</strong> button at the top of this page, select the <strong>Run Locally</strong> option, and follow the instructions.</p><p>The following topics will cover for analysis.</p><ul><li>Downloading a dataset from an online source</li><li>Data preparation and cleaning with Pandas</li><li>Open-ended exploratory analysis and visualization</li><li>Asking and answering interesting questions</li><li>Summarizing inferences and drawing conclusions</li></ul><h3>Installing Packages and Importing Libraries</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D12-13&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D12-13&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/b5713ec1ccf5288130e214c3ea5f6753/href">https://medium.com/media/b5713ec1ccf5288130e214c3ea5f6753/href</a></iframe><h3>STEP 1: Download the dataset.</h3><p>Download the swiggy data from <a href="https://jovian.com/outlink?url=%27https%3A%2F%2Fwww.kaggle.com%2Fdatasets%2Fashishjangra27%2Fswiggy-restaurants-dataset%27">Kaggle</a> URL.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D16&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D16&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/aca86481f28d804a9446847d2c96f092/href">https://medium.com/media/aca86481f28d804a9446847d2c96f092/href</a></iframe><h3>STEP 2: Data Preparation &amp; Cleaning.</h3><p>Steps that are followed for data preparation and cleaning:</p><ol><li>Load the file using pandas.</li><li>Select the required columns from the dataset.</li><li>Viewing basic information for the dataset.</li><li>Handling missing and duplicate data.</li><li>Split city column and create two new columns as town and cities.</li><li>Conversion of data type in the dataset.</li><li>Check for Outliers.</li><li>Filtering Final DataFrame with required columns for Data Analysis.</li></ol><h4>1. Load swiggy_csv dataset.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D19&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D19&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/547fbe98584acf8d56cbd4f3cfcbbc62/href">https://medium.com/media/547fbe98584acf8d56cbd4f3cfcbbc62/href</a></iframe><h4>2. Select required columns from the dataset.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D21&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D21&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/ba6ef31531069cc7650dbabe19d7880d/href">https://medium.com/media/ba6ef31531069cc7650dbabe19d7880d/href</a></iframe><h4>3. View basic information about rows, columns, and data types from the dataset.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D23&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D23&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee4bd3612d238b3b719078b04c775c08/href">https://medium.com/media/ee4bd3612d238b3b719078b04c775c08/href</a></iframe><h4>4. Handling missing and duplicate data.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D26-38&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D26-38&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/a558a6498269da737305d78d13576fc0/href">https://medium.com/media/a558a6498269da737305d78d13576fc0/href</a></iframe><h4>5. Create two new columns town and cities from city column.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D40-47&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D40-47&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/aa9799e482c89b9c29216bfbb8c09e81/href">https://medium.com/media/aa9799e482c89b9c29216bfbb8c09e81/href</a></iframe><h4>6. Datatypes conversions of the dataset.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D49-59&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D49-59&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/49c410a0e8d67c10d7eda6f7db9ea1be/href">https://medium.com/media/49c410a0e8d67c10d7eda6f7db9ea1be/href</a></iframe><h4>7. Check for Outliers.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D61-72&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D61-72&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/1b1f394932934b835ac055b1eac19aa1/href">https://medium.com/media/1b1f394932934b835ac055b1eac19aa1/href</a></iframe><h4>8. Filtering Final DataFrame with required columns for Data Analysis.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D74-75&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D74-75&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/775f2f6edee4add27d289aacbd2c93c2/href">https://medium.com/media/775f2f6edee4add27d289aacbd2c93c2/href</a></iframe><h3>STEP 3: Performing Exploratory Analysis &amp; Visualization.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N2-qfYFsCyvDV_wjwooKVg.png" /></figure><h4>1. name</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D78-80&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D78-80&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/358cdf47c1d9c5ece7894d2dc910f4d3/href">https://medium.com/media/358cdf47c1d9c5ece7894d2dc910f4d3/href</a></iframe><h4>2. rating_count</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D82-84&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D82-84&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/33b2d0f4f904624953fc5b9a9aeadbd8/href">https://medium.com/media/33b2d0f4f904624953fc5b9a9aeadbd8/href</a></iframe><h4>3. rating</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D86-89&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D86-89&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/532e9a7e1264b260bfda28f55fc0319f/href">https://medium.com/media/532e9a7e1264b260bfda28f55fc0319f/href</a></iframe><h4>4. cuisine</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D91-96&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D91-96&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/4800d3be04e9e536ba00d732a91ba2e2/href">https://medium.com/media/4800d3be04e9e536ba00d732a91ba2e2/href</a></iframe><h4>5. cities</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D98-102&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D98-102&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/068fe7ef629784cf1084c501c06eedb5/href">https://medium.com/media/068fe7ef629784cf1084c501c06eedb5/href</a></iframe><h3>STEP 4: Ask &amp; Answer Interesting Questions from the data.</h3><h4>1. Which cities have the average restaurant food cheaper?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D105-106&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D105-106&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/14d75d38dc94deede3746ef57e3b6d4c/href">https://medium.com/media/14d75d38dc94deede3746ef57e3b6d4c/href</a></iframe><h4>2. Which cities have restaurant ratings below 2.5?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D108-109&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D108-109&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/f1a0aca557024880c98e2a4b7de0be52/href">https://medium.com/media/f1a0aca557024880c98e2a4b7de0be52/href</a></iframe><h4>3. Which cities and towns have the maximum ratings?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D111-112&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D111-112&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/1f1898eb01690c1f87a757a963d60c59/href">https://medium.com/media/1f1898eb01690c1f87a757a963d60c59/href</a></iframe><h4>4. Which are the restaurants in Chennai to which customer has given the maximum rating?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D114-116&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D114-116&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/60e5363ad0a012c3946dacdc8bb8bcc3/href">https://medium.com/media/60e5363ad0a012c3946dacdc8bb8bcc3/href</a></iframe><h4>5. Which are the cities that have the maximum number of Diminnos Pizza outlets?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D118-119&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D118-119&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/2050ba1d22ffc6391a17f00887415388/href">https://medium.com/media/2050ba1d22ffc6391a17f00887415388/href</a></iframe><h4>6. Which cities serve expensive food in India?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D121-122&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D121-122&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/e18d78183b101ac830f2d06264a7c826/href">https://medium.com/media/e18d78183b101ac830f2d06264a7c826/href</a></iframe><h4>7. Which are the cities where the customer has not given ratings to restaurants? i.e (‘TOO FEW RATINGS’)</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D124-125&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D124-125&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/58f62ecd1af02293ccd2486f71a15ab8/href">https://medium.com/media/58f62ecd1af02293ccd2486f71a15ab8/href</a></iframe><h4>8. Which are the cities in India where customers like to eat Fast Food and Chinese Food?</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D127-129&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D127-129&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/73f09155da16e555cec54420cd78bde7/href">https://medium.com/media/73f09155da16e555cec54420cd78bde7/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.com%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D130-131&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ml%2Frahulhande2780%2Ffinal-swiggy-data-analysis-1%2Fv%2F118%26cellId%3D130-131&amp;image=https%3A%2F%2Fapi.jovian.com%2Fapi%2Fgist%2Ffcb1be1744c34f0884ec886f4cea7c50%2Fpreview%2F9d682cb8e4604b249573ecb6c32bb967&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/7114bcaa38a81a357fbce97da8d07bf1/href">https://medium.com/media/7114bcaa38a81a357fbce97da8d07bf1/href</a></iframe><h3>STEP 5: Summary and Conclusion.</h3><h4>Summary:</h4><ul><li>The rating column in the dataset shows -- as there is no rating values below 1.0</li><li>There are a few names of the restaurant with the same name in upper case and lower case.</li><li>The restaurant data contains cuisine in pairs like Chinese, and Indian. So it is necessary to provide unique cuisine details.</li><li>The id values for the restaurant are unique.</li><li>The cost column in the dataset contains values like ₹300,350, ₹8,000, ₹7,000, and ₹5,000 where the price is incorrect.</li><li>After placing the order, most of the customers have not given ratings to the restaurant.</li></ul><h4>Conclusion:</h4><ul><li>Dominos, Pizza Hut, and KFC have the largest restaurant franchise across India on swiggy app.</li><li>There are more than 80,000 restaurant counts where the customer has not given ratings.</li><li>There are 54.5% of restaurants with ratings between 3.1 to 4.0. There are 40.3% of restaurants with ratings between 4.1 to 5.0.</li><li>Chinese is available with a maximum number of restaurants across India.</li><li>The top most expensive restaurants are in Mumbai.</li><li>Coimbatore, Lucknow, Surat, Vijayawada, and Ludhiana are the top 5 cities where the average cost of restaurants is cheaper.</li><li>Bangalore, Delhi, Pune, Hyderabad &amp; Chennai are the cities having the top 5 maximum restaurants across India.</li><li>Hyderabad is one of the top cities in India that has the maximum number of restaurants with a rating of less than 2.5.</li><li>Bangalore, Delhi, Pune, Hyderabad, and Chennai are the top 5 cities in India with a maximum number of restaurants available on swiggy.</li><li>Bangalore, Chennai, Pune, and Hyderabad are the cities that have the maximum number of Domino’s Pizza outlets.</li><li>The customers living in Delhi, Pune &amp; Bangalore cities have not given ratings to the maximum restaurants.</li><li>There are very few restaurants for which customers have given high ratings. i.e (5K+ rating and 10K+ rating)</li></ul><h3>STEP 6: Ideas for Future Work.</h3><ul><li>We will read the JSON file from menu column to get the menu list.</li><li>We will show the menu-wise data of restaurants according to their availability.</li><li>We will create a column with the current status of the restaurant whether it is available for service or discontinued.</li><li>We can analyze the lowest-rated restaurant for every city and give a remark in a new column.</li><li>We will scrape the data and differentiate between Veg and Non-Veg restaurants with their famous dishes.</li></ul><h3>STEP 7: References</h3><ul><li>Opendatasets for downloading datasets from Kaggle — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fgithub.com%2FJovianML%2Fopendatasets">https://github.com/JovianML/opendatasets</a></li><li>Resetting Index in pandas data frame — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.geeksforgeeks.org%2Fpandas-how-to-reset-index-in-a-given-dataframe%2F">https://www.geeksforgeeks.org/pandas-how-to-reset-index-in-a-given-dataframe/</a></li><li>Split function — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.w3schools.com%2Fpython%2Fref_string_split.asp">https://www.w3schools.com/python/ref_string_split.asp</a>, <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.edureka.co%2Fblog%2Fsplit-function-in-python%2F">https://www.edureka.co/blog/split-function-in-python/</a></li><li>Replace function — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.w3schools.com%2Fpython%2Fpandas%2Fref_df_replace.asp">https://www.w3schools.com/python/pandas/ref_df_replace.asp</a>, <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.easytweaks.com%2Fpandas-replace-column-values%2F">https://www.easytweaks.com/pandas-replace-column-values/</a>, <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.easytweaks.com%2Fpandas-replace-column-values%2F">https://www.easytweaks.com/pandas-replace-column-values/</a></li><li>Duplicates function — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.w3schools.com%2Fpython%2Fpandas%2Fpandas_cleaning_duplicates.asp">https://www.w3schools.com/python/pandas/pandas_cleaning_duplicates.asp</a></li><li>Pandas Dataframe Examples: Column Operations — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fqueirozf.com%2Fentries%2Fpandas-dataframe-examples-column-operations">https://queirozf.com/entries/pandas-dataframe-examples-column-operations</a></li><li>Convert object to float database — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.golinuxcloud.com%2Fpandas-convert-column-to-float%2F">https://www.golinuxcloud.com/pandas-convert-column-to-float/</a>, <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.golinuxcloud.com%2Fpandas-convert-column-to-float%2F">https://www.golinuxcloud.com/pandas-convert-column-to-float/</a></li><li>Drop columns in pandas dataframe — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.geeksforgeeks.org%2F%2Chow-to-drop-one-or-multiple-columns-in-pandas-dataframe%2F">https://www.geeksforgeeks.org/,how-to-drop-one-or-multiple-columns-in-pandas-dataframe/</a></li><li>Subploting in seaborn — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.geeksforgeeks.org%2F">https://www.geeksforgeeks.org/</a>, how-to-drop-one-or-multiple-columns-in-pandas-dataframe/</li><li>Bar plot in seaborn — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fseaborn.pydata.org%2Fgenerated%2Fseaborn.barplot.html">https://seaborn.pydata.org/generated/seaborn.barplot.html</a></li><li>Setting the Font, Title, Legend Entries, and Axis Titles in Plotly — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fplotly.com%2Fpython%2Ffigure-labels%2F">https://plotly.com/python/figure-labels/</a></li><li>Histogram plotting using plotly — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fplotly.com%2Fpython%2Fhistograms%2F">https://plotly.com/python/histograms/</a></li><li>Bar chart in plotly — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fplotly.com%2Fpython%2Fbar-charts%2F">https://plotly.com/python/bar-charts/</a></li><li>Pie chart in plotly — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fplotly.com%2Fpython%2Fpie-charts%2F">https://plotly.com/python/pie-charts/</a></li><li>Sun-burst chart in plotly — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fplotly.com%2Fpython%2Fsunburst-charts%2F">https://plotly.com/python/sunburst-charts/</a>, <a href="https://jovian.com/outlink?url=https%3A%2F%2Fwww.geeksforgeeks.org%2Fsunburst-plot-using-plotly-in-python%2F">https://www.geeksforgeeks.org/sunburst-plot-using-plotly-in-python/</a></li><li>Boxplot in plotly — <a href="https://jovian.com/outlink?url=https%3A%2F%2Fplotly.com%2Fpython%2Fbox-plots%2F%23basic-box-plot">https://plotly.com/python/box-plots/#basic-box-plot</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1bd6941ccf08" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scraping Selected Categories on netmeds.com]]></title>
            <link>https://medium.com/@rahulhande2780/scraping-selected-categories-on-netmeds-com-73140c3a7537?source=rss-61b2279e9af7------2</link>
            <guid isPermaLink="false">https://medium.com/p/73140c3a7537</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[python-webscraping]]></category>
            <dc:creator><![CDATA[Rahul Hande]]></dc:creator>
            <pubDate>Sat, 15 Oct 2022 12:34:13 GMT</pubDate>
            <atom:updated>2023-05-29T05:42:07.650Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gt0vU5-srdXgXhcyyN7kAg.png" /></figure><h4>using Python, Requests and BeautifulSoup</h4><p>netmeds.com is a one-stop healthcare shop containing a list of products with different categories. There are exclusive discounts all year round. They also call themselves as India Ki Pharmacy where consumers can buy medicines and wellness products using an online portal or app.</p><p>The page <a href="https://www.netmeds.com/non-prescriptions/diabet">https://www.netmeds.com/non-prescriptions/diabet</a>es-support provides a list of categories on netmeds.com. In this project, we will select a category and retrieve information from this page using <em>web scraping</em>: the process of extracting information from a website in an automated fashion using code.</p><p>We’ll use the Python library requests and beautifulsoup4 to scrape data from this page.</p><p>Here’s an outline of the steps we’ll follow:</p><ol><li>Define the webpage.</li><li>Download the webpage using requests.</li><li>Parse the HTML source code using BeautifulSoup.</li><li>Extract the list of category Names.</li><li>Extract list of sub-categories (name and href).</li><li>Extract all Category and their Sub-category.</li><li>Extract Product Name, BuyPrice, MRP and Discount from Sub-category.</li><li>Scrape the data by compiling Python lists and dictionaries.</li><li>Save it into a CSV file.</li></ol><p>By the end of the project,</p><ol><li>We will create a CSV file named as Category name containing a list of product details in the following format.</li></ol><p>Category Name,Sub Category Name,Product Name,Buy Price,MRP,product_discount</p><p>Diabetes Support,Diabetes Care - Ayurveda,Kapiva Karela Jamun Juice 1 ltr, 296.65, 349.00,15%</p><p>You can find the full code for this post here: <a href="https://jovian.ai/rahulhande2780/finalscrape-netmeds-com-project">https://jovian.ai/rahulhande2780/finalscrape-netmeds-com-project</a></p><h3>Define the webpage.</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D7&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D7&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fe89325ed73a54ee7bb51ceaae778b681&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/3eeca9ce4fb083066c1f27049b08d101/href">https://medium.com/media/3eeca9ce4fb083066c1f27049b08d101/href</a></iframe><h3>Download the webpage using requests &amp; Parse the HTML source code using BeautifulSoup.</h3><ul><li>Let&#39;s define a function getBSoupDocFromUrl for parsing the data using BeautifulSoup.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D9&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D9&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fe89325ed73a54ee7bb51ceaae778b681&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/cbb509d0eebb638373e1c0dc40512ee4/href">https://medium.com/media/cbb509d0eebb638373e1c0dc40512ee4/href</a></iframe><h3>Extract the list of category Names.</h3><ul><li>Let&#39;s define a function getMainCategoryList to get the list of categories.</li></ul><ol><li>Create a variable with a blank list catname_list = [].</li><li>We have used for loop in &lt;ul tag&gt;, &lt;li tag&gt; and &lt;a tag&gt; for getting the list category.</li><li>catname = a.text will give the category name in text format.</li><li>catname_list.append(catname) will add the category name to the list.</li><li>return catname_list; returns the value in a list out from the function.</li></ol><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D13-15&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D13-15&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fe89325ed73a54ee7bb51ceaae778b681&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/054c302ca5a82b4440d38e8011f72299/href">https://medium.com/media/054c302ca5a82b4440d38e8011f72299/href</a></iframe><h3>Extract the list of Sub-category (name and href).</h3><ul><li>Let&#39;s define a function getSubCategoryOfCategory to get the list of subcategories (name and href)</li></ul><ol><li>Creating a blank list subcat_list = []</li><li>We have used for loop to get into &lt;ul tag&gt;, &lt;li tag&gt; and &lt;a tag&gt; for getting the list of the category names.</li><li>if a.text == categoryName: will check for specific subcategory names.</li><li>We have mentioned &lt;a tag&gt; class_=&#39;cat-submenu-level1&#39; for getting Subcategory.</li><li>We have created a dictionary bv = dict() to store name and href of Subcategory in the list of dictionary.</li><li>subcat_list.append(bv) will add dictionary data to the list.</li></ol><p>OUTPUT format :- {‘name’: ‘SubcategoryName’, ‘href’ : ‘Subcategorylink’}</p><h3>Extract Product Name, BuyPrice, MRP and Discount from Sub-category</h3><ul><li>Lets define a function getProductListOfSubCategory for getting Product Name, BuyPrice, MRP and Discount.</li><li>product_name, product_buyprice, product_mrp, product_discount will get the values.</li><li>bv() creates a dictionary.</li><li>bv[‘Product Name’], bv[‘Buy Price’], bv[‘MRP’], bv[‘product_discount’] will save the product details in dictionary.</li><li>bv[‘Buy Price’] = product_buyprice.text[3: ] where [3:] is used for slicing the data.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D25&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D25&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fbe454cbf9c5149039f819418d3f4da68&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/6e7a8e769389f4061dbabbee15a49846/href">https://medium.com/media/6e7a8e769389f4061dbabbee15a49846/href</a></iframe><h3>Scrape the data by compiling Python lists and dictionaries.</h3><ul><li>Let’s define a function scrape_Single_category to compile python list and dictionary and save it into CSV file.</li></ul><ol><li>We will select specific category and their list of subcategory as diabeticSuport= subCatgoryDictList[categoryName].</li><li>categoryData = [] creates an empty list.</li><li>subDoc = getBSoupDocFromUrl(subCategory[&#39;href&#39;]) will parse specific link of sub-category data.</li><li>data = getProductListOfSubCategory will give the product list of each sub-category (product Name, Buy Price, MRP, Discount)</li></ol><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D27&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D27&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fbe454cbf9c5149039f819418d3f4da68&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/0ffed63e8847114287b7b529896ae423/href">https://medium.com/media/0ffed63e8847114287b7b529896ae423/href</a></iframe><h4>Defining a main function for puting it all together.</h4><ul><li>Creating a blank list using finalData = []</li><li>We have a path to save the CSV file in the folder.</li><li>We have a function getBSoupDocFromUrl that parses html data using Beautiful Soup.</li><li>We have a function getMainCategoryList that gives the category list.</li><li>We have a function getAllSubCategoryData that gives all subcategory data.</li><li>We have a function to scrape the selected category and get sub-category product details (Product Name, BuyPrice, MRP, Discount) and save the data as categoryName.csv</li><li>Please note that folder name will be named as categoryName.csv. And it will contain product details (Product Name, BuyPrice, MRP, Discount) for every subcategory of the selected category.</li></ul><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D29&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F29%26cellId%3D29&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fbe454cbf9c5149039f819418d3f4da68&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/1014054a9cf49434de49ed2c85f2ee63/href">https://medium.com/media/1014054a9cf49434de49ed2c85f2ee63/href</a></iframe><h3>Lets run it to scrape the sub-category product details by mentioning category name.</h3><p>Category Names: [ ‘Veterinary’, ‘Ayush’, ‘Fitness’, ‘Mom &amp; Baby’, ‘Sexual Wellness’, ‘Treatments’, ‘Devices’, ‘Health Conditions’, ‘Otc Deals’, ‘Eyewear’, ‘Covid Essentials’, ‘Surgical’, ‘Diabetes Support’, ‘Fragrances’, ‘Make-Up’, ‘Hair’, “Men’s Grooming”, ‘Skin Care’, ‘Tools &amp; Appliances’, ‘Wellness’, ‘Personal Care’ ]</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F36%26cellId%3D31-32&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F36%26cellId%3D31-32&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fab70e1189c3c4993a0757a52e3c44bcc&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/75df0173dc762976ef459abaa2c3ddb2/href">https://medium.com/media/75df0173dc762976ef459abaa2c3ddb2/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fjovian.ai%2Fembed%3Furl%3Dhttps%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F36%26cellId%3D33-34&amp;dntp=1&amp;display_name=Jovian&amp;url=https%3A%2F%2Fjovian.ai%2Frahulhande2780%2Ffinalscrape-netmeds-com-project%2Fv%2F36%26cellId%3D33-34&amp;image=https%3A%2F%2Fapi.jovian.ai%2Fapi%2Fgist%2F98626d7f4c5947409d996ae3d9e42aab%2Fpreview%2Fab70e1189c3c4993a0757a52e3c44bcc&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=jovian" width="800" height="200" frameborder="0" scrolling="no"><a href="https://medium.com/media/250f6930c1dc847dd6fa448555cc2c55/href">https://medium.com/media/250f6930c1dc847dd6fa448555cc2c55/href</a></iframe><h3>Summary:</h3><ol><li>We had define the webpage as mainUrl = “<a href="https://www.netmeds.com/non-prescriptions/diabetes-support%22">https://www.netmeds.com/non-prescriptions/diabetes-support&quot;</a>.</li><li>We had define a function getBSoupDocFromUrl which download the webpage using requests and parse the data using Beautiful Soup</li><li>We had define a function getMainCategoryList to get the list of categories Names.</li><li>We had define a function getSubCategoryOfCategory to get the list of subcategories (name and href)</li><li>We had define a function getAllSubCategoryData to get the list of all subcategories and categories.</li><li>We had define a function getProductListOfSubCategory for getting Product Name, BuyPrice, MRP and Discount.</li><li>We had define a function scrape_Single_category to compile python list and dictionary and save it into CSV file.</li><li>We had define a function main. By mentioning Category Name in main function, we will retrive categoryName.CSV data which contains the list of product details for every sub-category of the selected category.</li></ol><h3>References:</h3><ul><li>References of links that we found useful:</li></ul><ol><li><a href="https://jovian.ai/learn/zero-to-data-analyst-bootcamp/assignment/project-web-scraping-with-python">https://jovian.ai/learn/zero-to-data-analyst-bootcamp/assignment/project-web-scraping-with-python</a></li><li><a href="https://realpython.com/python-requests/">https://realpython.com/python-requests/</a></li><li><a href="https://www.geeksforgeeks.org/implementing-web-scraping-python-beautiful-soup/">https://www.geeksforgeeks.org/implementing-web-scraping-python-beautiful-soup/</a></li><li><a href="https://stackoverflow.com/questions/55507926/create-folders-dynamically-and-write-csv-files-to-that-folders">https://stackoverflow.com/questions/55507926/create-folders-dynamically-and-write-csv-files-to-that-folders</a></li><li><a href="https://stackoverflow.com/questions/1720421/how-do-i-concatenate-two-lists-in-python">https://stackoverflow.com/questions/1720421/how-do-i-concatenate-two-lists-in-python</a></li></ol><h3>Future Work:</h3><ul><li>Ideas for future work:</li></ul><ol><li>We can fetch product image, product Rating and reviews, Mkt, Country of Origin</li><li>We can fetch the medicine data from <a href="https://www.netmeds.com/prescriptions">https://www.netmeds.com/prescriptions</a></li><li>We can fetch the healthcare official blogs from <a href="https://www.netmeds.com/health-library">https://www.netmeds.com/health-library</a></li><li>We can fetch wellness category that are containing list of products.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73140c3a7537" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>