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

BUG: Unclear error reporting when groupby apply func is wrong #690

Open
ChengjieLi28 opened this issue Sep 12, 2023 · 0 comments
Open

BUG: Unclear error reporting when groupby apply func is wrong #690

ChengjieLi28 opened this issue Sep 12, 2023 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@ChengjieLi28
Copy link
Contributor

Note that the issue tracker is NOT the place for general support. For
discussions about development, questions about usage, or any general questions,
contact us on https://discuss.xorbits.io/.
Reproduce:

import xorbits.pandas as pd

df = pd.DataFrame({'a': [20200101], "b": ["test"]})

def t(x):
    # should be startswith
    return x[x.str.starts_with("te")].count()

print(df.groupby("a", as_index=False)["b"].apply(t))

The example above raises:

TypeError: Cannot determine dtypes by calculating with enumerate data, please specify it as arguments

However, this is just a typo error in udf t. The error message is unclear.

@XprobeBot XprobeBot added the bug Something isn't working label Sep 12, 2023
@XprobeBot XprobeBot modified the milestones: v0.6.1, v0.6.2 Sep 12, 2023
@XprobeBot XprobeBot modified the milestones: v0.6.2, v0.6.3, v0.7.0 Sep 20, 2023
@XprobeBot XprobeBot modified the milestones: v0.7.0, v0.7.1 Oct 23, 2023
@XprobeBot XprobeBot modified the milestones: v0.7.1, v0.7.2 Nov 21, 2023
@XprobeBot XprobeBot modified the milestones: v0.7.2, v0.7.3 Jan 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants