Skip to content

Instantly share code, notes, and snippets.

@txominpelu
Created July 24, 2015 14:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save txominpelu/a67fe0a00689ae3bcad8 to your computer and use it in GitHub Desktop.
Save txominpelu/a67fe0a00689ae3bcad8 to your computer and use it in GitHub Desktop.
generator
lines = 30000
types = {
"date" : "01-04-2015",
"string" : "hello",
"number" : "10000"
}
class Column(object):
def __init__(self, name, t):
self.name = name
self.t = t
date_columns = [Column("date-{0}".format(i), "date") for i in range(100)]
string_columns = [Column("string-{0}".format(i), "string") for i in range(100)]
number_columns = [Column("number-{0}".format(i), "number") for i in range(100)]
all = date_columns + string_columns + number_columns
print ",".join([c.name for c in all])
for i in range(lines):
print ",".join( [types[c.t] for c in all])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment