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

ValueError in datamodel.Data #16

Closed
anatolec opened this issue Feb 19, 2024 · 1 comment
Closed

ValueError in datamodel.Data #16

anatolec opened this issue Feb 19, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@anatolec
Copy link

anatolec commented Feb 19, 2024

Describe the bug
Hey, great job for this package. Is it still being maintained ? I'd like to know before using it in prod.
Also, I believe there is a bug in datamodel.Data. If you pass a dataset_2 that does not contain id_column_name_1 (which seems like a valid case) you will get a ValueError.

To Reproduce
Steps to reproduce the behavior:

import pandas as pd
from pyjedai.datamodel import Data

df1 = pd.DataFrame({'id': [1, 2], 'data': ['a', 'b']})
df2 = pd.DataFrame({'other_id': [1, 2], 'data': ['a', 'b']})
Data(
    dataset_1=df1,
    id_column_name_1="id",
    dataset_2=df2,
    id_column_name_2="other_id",
)

--> ValueError

Expected behavior
No ValueError

Additional context
I believe here, it should be self.attributes_2.remove(self.id_column_name_2) instead of self.attributes_2.remove(self.id_column_name_1)

@Nikoletos-K
Copy link
Member

Hello! Yes it is maintained and will be expanded even more. As for the bug, you're right. Thanks for your trace and detailed report. I fixed it and will be updated asap in the next release.

Feel free to contact me if you need anything else.

Cheers,
Konstantinos

@Nikoletos-K Nikoletos-K self-assigned this Feb 19, 2024
@Nikoletos-K Nikoletos-K added the bug Something isn't working label Feb 19, 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