Created
May 22, 2019 12:02
-
-
Save sbalnojan/87e960b05708d6af4f55fdd4ed563314 to your computer and use it in GitHub Desktop.
dump a df to s3 via s3fs
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
# ... | |
# your data preprocessing... | |
if __name__ == "__main__": | |
# ... | |
# your data preprocessing... | |
s3 = s3fs.S3FileSystem(anon=False) | |
df = pd.DataFrame(data={"foo":[0]}) | |
print(df) | |
with s3.open(f"{BUCKET_NAME}/data_bow_limit40000.csv",'w') as f: | |
df.to_csv(f) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment