how to read the csv file using pandas in aws lambda
import json import os import boto3 import csv import sys import pandas as pd from io import BytesIO s3_client = boto3.client('s3') bucket_name ='bucket_name' s3_file_name ='s3_file_name.csv' def lambda_handler(event, context): print(event) try: # bucket_name = event["Records"][0]["s3"]["bucket"]["name"] # s3_file_name = event["Records"][0]["s3"]["object"]["key"] resp = s3_client.get_object(Bucket=bucket_name, Key=s3_file_name) df= pd.read_csv(resp['Body'], sep=',') print(df.head(2)) except Exception as err: print(err)