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

test_pivot failed with KeyError: nan #7010

Open
anmyachev opened this issue Mar 5, 2024 · 0 comments
Open

test_pivot failed with KeyError: nan #7010

anmyachev opened this issue Mar 5, 2024 · 0 comments
Labels
bug 🦗 Something isn't working pandas concordance 🐼 Functionality that does not match pandas

Comments

@anmyachev
Copy link
Collaborator

anmyachev commented Mar 5, 2024

Found in #6954

Traceback:

    def test_pivot(data, index, columns, values):
>       eval_general(
            *create_test_dfs(data),
            lambda df, *args, **kwargs: df.pivot(*args, **kwargs),
            index=index,
            columns=columns,
            values=values,
        )

modin\pandas\test\dataframe\test_default.py:602:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
modin\pandas\test\utils.py:937: in eval_general
    comparator(*values, **(comparator_kwargs or {}))
modin\pandas\test\utils.py:709: in df_equals
    assert_dtypes_equal(df1, df2)
modin\pandas\test\utils.py:635: in assert_dtypes_equal
    if isinstance(df1.dtypes, (pandas.Series, pd.Series)):
modin\pandas\base.py:4193: in __getattribute__
    attr = super().__getattribute__(item)
modin\pandas\dataframe.py:328: in dtypes
    return self._query_compiler.dtypes
modin\core\storage_formats\pandas\query_compiler.py:321: in dtypes
    return self._modin_frame.dtypes
modin\core\dataframe\pandas\dataframe\dataframe.py:388: in dtypes
    dtypes = self._dtypes.get()
modin\core\dataframe\pandas\metadata\dtypes.py:936: in get
    self._value = self._value.to_series()
modin\core\dataframe\pandas\metadata\dtypes.py:441: in to_series
    self.materialize()
modin\core\dataframe\pandas\metadata\dtypes.py:424: in materialize
    self._known_dtypes = {
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <range_iterator object at 0x00000288A87CA150>

    self._known_dtypes = {
>       self.columns_order[i]: self._known_dtypes[self.columns_order[i]]
        for i in range(len(self.columns_order))
    }
E   KeyError: nan

modin\core\dataframe\pandas\metadata\dtypes.py:425: KeyError
@anmyachev anmyachev added bug 🦗 Something isn't working pandas concordance 🐼 Functionality that does not match pandas labels Mar 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 pandas concordance 🐼 Functionality that does not match pandas
Projects
None yet
Development

No branches or pull requests

1 participant