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

Python 3.8 'DataFrame' object has no attribute 'map' #1366

Open
1 of 2 tasks
xzdandy opened this issue Nov 17, 2023 · 1 comment · Fixed by #1374
Open
1 of 2 tasks

Python 3.8 'DataFrame' object has no attribute 'map' #1366

xzdandy opened this issue Nov 17, 2023 · 1 comment · Fixed by #1374
Assignees
Labels
Bug 🐞 EVA is not working as expected
Milestone

Comments

@xzdandy
Copy link
Collaborator

xzdandy commented Nov 17, 2023

Search before asking

  • I have searched the EvaDB issues and found no similar bug report.

Bug

evadb/executor/project_executor.py:49: in exec
    batch = apply_project(batch, self.target_list)
evadb/executor/executor_utils.py:69: in apply_project
    batches = [expr.evaluate(batch) for expr in project_list]
evadb/executor/executor_utils.py:69: in <listcomp>
    batches = [expr.evaluate(batch) for expr in project_list]
evadb/expression/function_expression.py:129: in evaluate
    outcomes = self._apply_function_expression(func, batch, **kwargs)
evadb/expression/function_expression.py:188: in _apply_function_expression
    return func_args.apply_function_expression(func)
evadb/models/storage/batch.py:174: in apply_function_expression
    return Batch(expr(self._frames))
evadb/functions/abstract/abstract_function.py:36: in __call__
    return self.forward(args[0])
evadb/functions/helpers/upper.py:37: in forward
    ret["output"] = df.map(lambda s: s.upper() if type(s) is str else s)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self =    input
0  EvaDB, name = 'map'

    def __getattr__(self, name: str):
        """
        After regular attribute access, try looking up the name
        This allows simpler access to columns for interactive use.
        """
        # Note: obj.x will always call obj.__getattribute__('x') prior to
        # calling obj.__getattr__('x').
        if (
            name not in self._internal_names_set
            and name not in self._metadata
            and name not in self._accessors
            and self._info_axis._can_hold_identifiers_and_holds_name(name)
        ):
            return self[name]
>       return object.__getattribute__(self, name)
E       AttributeError: 'DataFrame' object has no attribute 'map'

test_evadb/lib/python3.8/site-packages/pandas/core/generic.py:5989: AttributeError

Environment

https://app.circleci.com/pipelines/github/georgia-tech-db/evadb/6111/workflows/e8c13913-0f88-42f5-86a7-0dd9b61cda2f/jobs/44296

Are you willing to submit a PR?

  • Yes I'd like to help by submitting a PR!
@xzdandy
Copy link
Collaborator Author

xzdandy commented Nov 22, 2023

@gaurav274 @jarulraj Shall we support python 3.8?

DataFrame.map is available after panda 2.1.0. However, it turns that this is not possible with python 3.8. Check the https://app.circleci.com/pipelines/github/georgia-tech-db/evadb/6180/workflows/ca63c7b4-8873-45a5-a5c2-3db4d06bf973/jobs/44816

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 EVA is not working as expected
Projects
Development

Successfully merging a pull request may close this issue.

1 participant