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

Fix to_list work properly in pandas < 0.24 #1823

Merged
merged 2 commits into from
Oct 7, 2020

Conversation

itholic
Copy link
Contributor

@itholic itholic commented Oct 6, 2020

Koalas doesn't support to_list in pandas<0.24 because pandas<0.24 doesn't support to_list as an alias for tolist.

>>> pd.__version__
'0.23.2'
>>> pser.to_list()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/haejoon.lee/opt/miniconda3/envs/koalas-dev-3.6/lib/python3.6/site-packages/pandas/core/generic.py", line 4372, in __getattr__
    return object.__getattribute__(self, name)
AttributeError: 'Series' object has no attribute 'to_list'
>>> pser.tolist()
[1, 2, 3]

This PR fix it to make working to_list properly in pandas<0.24.

@itholic
Copy link
Contributor Author

itholic commented Oct 7, 2020

I'm pretty sure this is minor fix. Please feel free to comment anytime !

@itholic itholic merged commit eb55106 into databricks:master Oct 7, 2020
@itholic itholic changed the title Fix to_list work properly in pandas==0.23 Fix to_list work properly in pandas < 0.24 Oct 7, 2020
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

Successfully merging this pull request may close these issues.

1 participant