Part 1: Dummy Datasets with Pandas for Testing Purposes

Mainly for testing purposes, sometimes we want to create some dummy data frames. Pandas give us this possibility with the util.testing package.

Dummy Data Frame

By default, it creates **30 **rows with **4 **columns called **A,B,C **and D and the **index **alpha-numeric.

import pandas as pd pd.util.testing.makeDataFrame().head()

Image for post

Dummy Data Frame with Missing Values

It assigns some NaN values randomly.

pd.util.testing.makeMissingDataframe().head()

Image for post

#scikit-learn #python #random-sampling #random-data-generator #pandas

How to Create Dummy Datasets
1.50 GEEK