Excel to Database using Pandas
Excel to Database using Pandas

Importing Data From Excel to MongoDB using Pandas.

The release of Excel-mongo-data-sync at Vivify Healthcare is part of the company’s research and development efforts to find the best technology stack that is both sustainable and affordable.
The company is constantly looking for ways to improve its offerings and stay ahead of the curve in the highly competitive healthcare industry. By Utilizing the leading and open-source platform for transforming; how people / organizations get benefited by using Excel-mongo-data-sync via HTML and CSS.
Vivify Healthcare aims to deliver a top-notch user experience while keeping costs low and maintaining stability, security and compliance. Excel-mongo-data-sync using Pythonprovides a flexible, scalable solution that can easily adapted to meet the changing needs of the business and its customers.

Excel to Database using Pandas

The script reads data from an Excel file and inserts it into a MongoDB database. It extracts information about mandals, districts, and revenue divisions from the Excel file and inserts this data into a specific collection in the MongoDB database. The script also retrieves the last inserted identifier from the collection and assigns unique identifiers to the new documents being inserted. This script automates the process of populating the MongoDB database with data from the Excel file.

Excel-mongo-data-sync

Importing data from Excel to MongoDB into one collection and making a relation with Another collection using Pandas

Prerequisites

  1. Python 3.x
  2. pymongo (pip install pymongo).
  3. pandas (pip install pandas).
  4. MongoDB server.

Usage

  1. Install the necessary Python libraries and ensure that a MongoDB server is running.
  2. Save the Excel file (‘xxxxx.xlsx’) in the specified location (‘FilePath’).
  3. Update the MongoDB connection details in the code if necessary. By default,e it connects to a MongoDB server running on ‘localhost’ at ‘port 27017’.
  4. Run the Python script.

The script will connect to the MongoDB database and insert the data from the Excel file into the ‘mandal_master’ collection.

Skip to content