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

Pandas list value not decoding properly #358

Open
brandonschabell opened this issue Jun 9, 2021 · 1 comment
Open

Pandas list value not decoding properly #358

brandonschabell opened this issue Jun 9, 2021 · 1 comment
Labels
bug wishlist An important issue where it'd take a lot of effort to make progress on

Comments

@brandonschabell
Copy link

When decoding a Pandas Dataframe which contains a list value, it is being decoded as a string.

import jsonpickle
import jsonpickle.ext.pandas as jsonpickle_pandas

jsonpickle_pandas.register_handlers()

df = pd.DataFrame({'col1': [[1, 2, 3], ['a', 'b', 'c']]})
assert type(df['col1'].iloc[0]) == list
data = jsonpickle.encode(df)
result = jsonpickle.decode(data)
assert type(result['col1'].iloc[0]) == list  # AssertionError: assert <class 'str'> == <class 'list'>
@losito105
Copy link

I am new to open source contribution, but I've worked with both jsonpickle and pandas in the past and I'd like to try to tackle this issue.

@Theelx Theelx added bug wishlist An important issue where it'd take a lot of effort to make progress on labels Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug wishlist An important issue where it'd take a lot of effort to make progress on
Projects
None yet
Development

No branches or pull requests

3 participants