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

Compatibility with narwhals-based tabmat #868

Merged
merged 3 commits into from
Oct 30, 2024
Merged

Compatibility with narwhals-based tabmat #868

merged 3 commits into from
Oct 30, 2024

Conversation

stanmart
Copy link
Collaborator

Checklist

  • Added a CHANGELOG.rst entry

Aims to fix #867.

  • One part of the issue was that narwhals is not (yet) an explicit dependency of glum (which is fine IMO) and nightlies are installed with --no-deps. This PR adds narwhals to the nightlies environment, but not the main one (where will be pulled in as a transitive dependency).
  • The other issue is caused by the fact that tabmat.from_pandas/df now does not accept dataframes which have non-unique column names. This was an unintentended consequence of switching to narwhals, but I think it's probably for the best. Unfortunately many of our golden master benchmarks do have duplicate columns. I think the best way to go would be to fix the benchmark datasets, but let me know if you'd rather allow duplicate column names (in which case the fix should be on the tabmat side).

@stanmart
Copy link
Collaborator Author

@MarcAntoineSchmidtQC let me know your thoughts about the duplicate column name issue.

@MarcAntoineSchmidtQC
Copy link
Member

adding narwhals to the "build-tabmat" group is good with me.

Regarding the duplicate columns, I think this was an issue with some of the logic. I agree that we should fix the benchmark dataset to not have duplicate names. We should also verify that we are giving an informative error message when this happens.

Thanks for taking care of this!

@stanmart stanmart marked this pull request as ready for review October 28, 2024 08:38
@stanmart
Copy link
Collaborator Author

We should also verify that we are giving an informative error message when this happens.

We should do this in tabmat, right?

@stanmart
Copy link
Collaborator Author

Thanks for the amazingly quick update @MarcoGorelli! 🙏 @MarcAntoineSchmidtQC, we can then merge this as is, right?

@jtilly jtilly merged commit e13ce58 into main Oct 30, 2024
22 checks passed
@jtilly jtilly deleted the fix-867 branch October 30, 2024 22:21
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.

Daily run failure: Unit tests
3 participants