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

Get rid of import * in the readme and elsewhere #75

Open
MrPowers opened this issue Mar 10, 2023 · 4 comments
Open

Get rid of import * in the readme and elsewhere #75

MrPowers opened this issue Mar 10, 2023 · 4 comments
Assignees

Comments

@MrPowers
Copy link
Collaborator

import * is a Python antipattern.

Let's get rid of it everywhere.

@paulooctavio
Copy link
Contributor

@MrPowers Can I get this one?

@paulooctavio
Copy link
Contributor

paulooctavio commented Aug 28, 2024

@SemyonSinchenko How should the import * in the README be replaced? I'm running into a TypeError: 'Column' object is not callable when trying to use any of the Column Extensions (e.g. isFalsy, isTruthy, etc.) after importing quinn.

Also, is F referring to from pyspark.sql import functions as F?

@SemyonSinchenko
Copy link
Collaborator

@paulooctavio Sorry for a long answer. You need to directly call a function like quinn.functions.is_falsy(col)
P.S. Feel free to ping me if I'm not responding

@MrPowers
Copy link
Collaborator Author

MrPowers commented Sep 6, 2024

I am looking here: https://github.com/mrpowers-io/quinn/blob/main/quinn/__init__.py#L41

Think we should recommend import quinn and then quinn.is_falsy. Hopefully we can expose the whole public interface (or most of it) in the quinn import.

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

3 participants