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] _builtin_table import in groupby apply (changed in pandas>=1.3.0) #2184

Merged
merged 6 commits into from
Aug 26, 2021

Conversation

Cedric-Magnan
Copy link
Contributor

I have recently had an issue while upgrading pandas to the latest version in my Databricks environment :

AttributeError: type object 'SelectionMixin' has no attribute '_builtin_table'

Pandas has recently refactored the way we import the _builtin_table and is now part of the pandas.core.common module instead of being an attribute of the pandas.core.base.SelectionMixin class.

PR that was merged in the 1.3.0 : pandas-dev/pandas#40857

This suggestion should solve the issue !

@Cedric-Magnan
Copy link
Contributor Author

I have recently had an issue while upgrading pandas to the latest version in my Databricks environment :

AttributeError: type object 'SelectionMixin' has no attribute '_builtin_table'

Pandas has recently refactored the way we import the _builtin_table and is now part of the pandas.core.common module instead of being an attribute of the pandas.core.base.SelectionMixin class.

PR that was merged in the 1.3.0 : pandas-dev/pandas#40857

This suggestion should solve the issue !

I've just seen that this issue was solved 6 days ago in the python/pyspark/pandas/groupby.py module from the spark repository :
https://github.com/apache/spark/pull/33598/files

@HyukjinKwon
Copy link
Member

@Cedric-Magnan would you mind bringing the changes to this PR?

@Cedric-Magnan
Copy link
Contributor Author

Cedric-Magnan commented Aug 23, 2021

@Cedric-Magnan would you mind bringing the changes to this PR?

@HyukjinKwon Comments from the pyspark repository have been applied to this PR in the latest commit.
Don't hesitate to tell me when you think the fix can be merged.

@HyukjinKwon
Copy link
Member

cc @ueshin

Copy link
Collaborator

@ueshin ueshin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, pending tests.

@codecov-commenter
Copy link

codecov-commenter commented Aug 25, 2021

Codecov Report

Merging #2184 (110acf5) into master (46c80e6) will decrease coverage by 0.19%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2184      +/-   ##
==========================================
- Coverage   95.36%   95.16%   -0.20%     
==========================================
  Files          60       60              
  Lines       13707    13746      +39     
==========================================
+ Hits        13071    13081      +10     
- Misses        636      665      +29     
Impacted Files Coverage Δ
databricks/koalas/groupby.py 93.95% <81.81%> (-0.40%) ⬇️
databricks/koalas/__init__.py 86.58% <0.00%> (-4.45%) ⬇️
databricks/koalas/typedef/typehints.py 92.46% <0.00%> (-2.95%) ⬇️
databricks/conftest.py 98.43% <0.00%> (-1.57%) ⬇️
databricks/koalas/plot/plotly.py 95.95% <0.00%> (-0.89%) ⬇️
databricks/koalas/plot/matplotlib.py 91.63% <0.00%> (-0.37%) ⬇️
databricks/koalas/indexes/multi.py 93.10% <0.00%> (-0.35%) ⬇️
databricks/koalas/tests/indexes/test_base.py 99.70% <0.00%> (-0.30%) ⬇️
databricks/koalas/generic.py 93.12% <0.00%> (-0.21%) ⬇️
databricks/koalas/namespace.py 84.55% <0.00%> (-0.20%) ⬇️
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 46c80e6...110acf5. Read the comment docs.

@HyukjinKwon HyukjinKwon merged commit e971d6f into databricks:master Aug 26, 2021
@HyukjinKwon
Copy link
Member

Merged. Thanks @Cedric-Magnan.

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.

4 participants