Generate random numbers with Python dataframe

Paul Yang - September 15th, 2022

Frequently, I find that I want to generate a quick table filled with random values for demo purposes. Maybe there’s some code, transformation, or function I need to test, but don’t have my real data yet.

This widget lets you quickly and easily generate dummy data for your use cases in a Pandas dataframe.

import pandas as pd
import numpy as np

numRows = 100   #number of rows
numCols = 10    #number of columns
minInt = 1      #minimum number
maxInt = 100    #maximum number

df = pd.DataFrame(np.random.randint(minInt,maxInt,size=(numRows, numCols)))

df

About

Einblick is an agile data science platform that provides data scientists with a collaborative workflow to swiftly explore data, build predictive models, and deploy data apps. Founded in 2020, Einblick was developed based on six years of research at MIT and Brown University. Einblick customers include Cisco, DARPA, Fuji, NetApp and USDA. Einblick is funded by Amplify Partners, Flybridge, Samsung Next, Dell Technologies Capital, and Intel Capital. For more information, please visit www.einblick.ai and follow us on LinkedIn and Twitter.

Start using Einblick

Pull all your data sources together, and build actionable insights on a single unified platform.

  • All connectors
  • Unlimited teammates
  • All operators