Created
December 29, 2017 12:24
-
-
Save solidpple/033ea815937cb38872e8e9dc2b51f243 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
def get_df(cols, filename, sep='\t'): | |
# filename = 'filename' | |
iter_csv = pd.read_csv(filename,iterator=True, chunksize=1000, sep=sep, names=cols) | |
# df = pd.concat([chunk[chunk['field'] > constant] for chunk in iter_csv]) | |
df = pd.concat([chunk for chunk in iter_csv]) | |
return df |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment