Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

read csv boto3

import pandas as pd
import boto3

bucket = "yourbucket"
file_name = "your_file.csv"

s3 = boto3.client('s3') 
# 's3' is a key word. create connection to S3 using default config and all buckets within S3

obj = s3.get_object(Bucket= bucket, Key= file_name) 
# get object and file (key) from bucket

initial_df = pd.read_csv(obj['Body']) # 'Body' is a key word
Comment

PREVIOUS NEXT
Code Example
Python :: change pandas column value based on condition 
Python :: python request post 
Python :: pandas percentage change across multiple periods 
Python :: browse list python 
Python :: how to create a cube in ursina 
Python :: python selenium hide log 
Python :: in 2002 elon musk age 
Python :: raatatatatatatatatatatatatatatatatatatatatatatatatatatattatana 
Python :: flask give port number 
Python :: DataFrame.plot.line() method: | dataframe line plot 
Python :: dataframe plot distribution of dates 
Python :: how to ask someone for their name in python 
Python :: upgrade to latest django version 
Python :: how to type a dict in python 
Python :: python make button do more than one command 
Python :: how to do processing on html file using python 
Python :: how to convert a dense matrix into sparse matrix in python 
Python :: how to know how much lines a file has using python 
Python :: how to reverse word order in python 
Python :: pygame tetris game tutorial 
Python :: none address in python 
Python :: find frequency of each word in a string in python using dictionary 
Python :: numpy take out elements equal to zero 
Python :: train test split python 
Python :: os run shell command python 
Python :: pandas dataframe rename column 
Python :: pandas sort values by multiple columns 
Python :: change tick labelsize matplotlib 
Python :: print nested list in new lines in python 
Python :: how to see if a proxy is up in python 
ADD CONTENT
Topic
Content
Source link
Name
2+1 =