Hello Developer’ s today we are learn create fake data and know about Fake Library in python3…


  1. Python3
  2. Faker library

What is Faker:

Faker is a Python package that generates fake data for you. Whether you need to bootstrap your database, create good-looking XML documents, fill-in your persistence to stress test it, or anonymize data taken from a production service, Faker is for you. let’us install faker library

python3 -m pip install Faker

If you are using python language, you can use a faker python package to create dummy data of any type, for example, dates, transactions, names, texts, time, and others. Faker is a simple python package that generates fake data with different data types.

Table of content’s:

  1. Create Faker Generator
  2. Create Names
  3. Create Dates and Times
  4. Create Personal Profile
  5. Create Sentence & Paragraph Data
  6. Create Localized Data
  7. Create the same Fake Data
  8. Reference

Create Fake Dummy Data :

To create and initialize a faker generator use the Faker() method for a specific country.Here i’m using for India

from faker import Faker

Let’us create some information like Names,Datetime and location

for _ in range(5):

If you are working with dates, faker provides different ways to create fake dates and times. In the following examples, you will learn 10 different ways to create dummy dates and times data.


Create a Personal Profile:

If you want to create fake personal and identity information you can use the profile and simple_profile methods from the faker library. The simple_profile method creates a fake basic profile with personal information such as name, gender, mail, and address.


Now we are move to create and render in tabluar form so we just use Pandas Library.

import pandas as pd

All of this we are also create and Generate a Basic Bank Account Number (BBAN) And SWIFT number letus do that..

from faker import Faker

Why faker library are used? :

Faker is an open-source python library that allows you to create your own dataset i.e you can generate random data with random attributes like name, age, location, etc.

It is used in datascience for fake data insertion and operation perform of each data sets.

If you want to learn more about Faker library then use faker documentaions

Good Bye Developer’s, Want to read more articles like this follow me and clap for this article!