Created
July 11, 2016 16:50
-
-
Save neil90/399a32ce417a07aa92b7d5ae152b5941 to your computer and use it in GitHub Desktop.
This file contains 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
from faker import Faker | |
fake = Faker() | |
outfile = 'data.csv' | |
outsize = 1024 * 1024 * 1024 # 1GB | |
with open(outfile, 'w') as csvfile: | |
size = 0 | |
while size < outsize: | |
txt = '%s, %s\n' % (fake.name(), fake.address()) | |
size += len(txt) | |
csvfile.write(txt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment