Skip to content
Advertisement

Pandas read_pickle from s3 bucket

I am working on a Jupyter notebook from AWS EMR.

I am able to do this: pd.read_csv("s3:\mypath\xyz.csv').

However, if I try to open a pickle file like this, pd.read_pickle("s3:\mypath\xyz.pkl")

I am getting this error:

JavaScript

However, I can see both xyz.csv and xyz.pkl in the same path! Can anyone help?

Advertisement

Answer

Pandas read_pickle supports only local paths, unlike read_csv. So you should be copying the pickle file to your machine before reading it in pandas.

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