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

gramex.ml.translate fails with pandas > 1.0 #761

Open
jaidevd opened this issue Jul 12, 2023 · 0 comments
Open

gramex.ml.translate fails with pandas > 1.0 #761

jaidevd opened this issue Jul 12, 2023 · 0 comments
Assignees

Comments

@jaidevd
Copy link
Member

jaidevd commented Jul 12, 2023

pip install gramex also installs the latest version of pandas (2.x), which seems to be incompatible with gramex.ml.translate.

Downgrading to pandas<2 fixes this.

Example:

>>> gramex.ml.translate('hola', source='es', target='en', key='...')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/jaidevd/conda/envs/gtr/lib/python3.11/site-packages/gramex/ml.py", line 395, in translate
    result = result.append(pd.DataFrame(new_data), sort=False)
             ^^^^^^^^^^^^^
  File "/home/jaidevd/conda/envs/gtr/lib/python3.11/site-packages/pandas/core/generic.py", line 5989, in __getattr__
    return object.__getattribute__(self, name)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'DataFrame' object has no attribute 'append'. Did you mean: '_append'?
@sanand0 sanand0 self-assigned this Jul 17, 2023
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

2 participants