Skip to content
Advertisement

Pandas to read a excel file from s3 and apply some operation and write the file in same location

i am using pandas to read an excel file from s3 and i will be doing some operation in one of the column and write the new version in same location. Basically new version will overwrite the original version.

with csv file i am able to achieve using the below code but not sure of excel(.xlsx). Please can someone help.

JavaScript

i tried to use the same code using read_excel and to_excel getting UnsupportedOperation: seek error.

JavaScript

Error Message:

JavaScript

sample file

s.no patient_id 1 100 2 200 3 300 4 400 5 500

Advertisement

Answer

Try the below solution it worked for me. Now you can directly pass the s3 location of the file.

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement