Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

boto3 upload dataframe directly to s3

from io import StringIO # python3; python2: BytesIO 
import boto3

bucket = 'my_bucket_name' # already created on S3
csv_buffer = StringIO()
df.to_csv(csv_buffer)
s3_resource = boto3.resource('s3')
s3_resource.Object(bucket, 'df.csv').put(Body=csv_buffer.getvalue())
Comment

PREVIOUS NEXT
Code Example
Python :: python sys environment 
Python :: centos install python 3.9 thelinuxterminal.com 
Python :: union type python 
Python :: export list to a file python 
Python :: read csv pandas nrow 
Python :: looping over dictionary python 
Python :: python dict add item 
Python :: python set terminal size 
Python :: python calculate the power of number 
Python :: decode a qrcode inpython 
Python :: python is ascii 
Python :: knn imputation in r 
Python :: how to print 0 to 10 in python 
Python :: Setting spacing (minor) between ticks in matplotlib 
Python :: python if not none in one line 
Python :: boder color in tkinter 
Python :: python strip whitespace 
Python :: geopandas change column name 
Python :: sftp python 
Python :: python max counts 
Python :: not intersection list python 
Python :: error python 
Python :: star program in python using for loop 
Python :: Python DateTime Time Class Example 
Python :: for in print 
Python :: remove duplicates from list python keep order 
Python :: Palindrome in Python Using while loop for string 
Python :: read variable in a string python 
Python :: django set default value for model not form 
Python :: float python 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =