Created
August 4, 2022 17:29
-
-
Save hernandohhoyos/d50cbc07040cd5b5a564f9d214d4e552 to your computer and use it in GitHub Desktop.
Generate CSV using pandas and numpy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
N = 10000 | |
df = pd.DataFrame( | |
np.random.randint(999, 999999, size=(N, 7)), columns=list("ABCDEFG") | |
) | |
df["H"] = np.random.rand(N) | |
df["I"] = pd.util.testing.rands_array(10, N) | |
df["J"] = pd.util.testing.rands_array(10, N) | |
df.to_csv("random_10K.csv", sep=",") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment