Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reading in pickle file throws an error #837

Open
lusiki opened this issue Aug 31, 2020 · 1 comment
Open

Reading in pickle file throws an error #837

lusiki opened this issue Aug 31, 2020 · 1 comment

Comments

@lusiki
Copy link

lusiki commented Aug 31, 2020

When I try to import pickle file in markdown:

{python}
import os
import pandas as pd
from pathlib import Path

input_data_path = 'D:/path'

IMPORT PREPARED DATA

X_train = pd.read_pickle(os.path.join(Path(input_data_path), 'X_train.pkl'))
X_test = pd.read_pickle(os.path.join(Path(input_data_path), 'X_test.pkl'))
y_train = pd.read_pickle(os.path.join(Path(input_data_path), 'y_train.pkl'))
y_test = pd.read_pickle(os.path.join(Path(input_data_path), 'y_test.pkl'))
labeling_info = pd.read_pickle(os.path.join(Path(input_data_path), 'labeling_info.pkl'))

{r}
X_train <- py$X_train

it returns an error:
Error in py_get_attr_impl(x, name, silent) :
AttributeError: 'DataFrame' object has no attribute '_data'

The same code works in python.

@kevinushey
Copy link
Collaborator

Can you please provide a reproducible example?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants